mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
vibe 500: Fix ide_powered() always returning false
While the right GPIO location is accessed, the result of the logical AND was tested wrong. I don't have this hardware, but I can imagine that bug caused ide_power_enable() to be called more times than it needed to be. cppcheck reported: [rockbox/firmware/target/arm/pbell/vibe500/power-vibe500.c:101]: (style) Expression '(X & 0x8) == 0x1' is always false. Change-Id: I98498f79d383c6f29869e170bfc94ba9a0d2ba7e
This commit is contained in:
parent
ef1497c3df
commit
d62e1b3c5f
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ void ide_power_enable(bool on)
|
|||
|
||||
bool ide_powered(void)
|
||||
{
|
||||
return ((GPIOC_INPUT_VAL & 0x08) == 1);
|
||||
return ((GPIOC_INPUT_VAL & 0x08) != 0);
|
||||
}
|
||||
|
||||
void power_off(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue