Skip to content

Commit

Permalink
staging: wfx: fix test on return value of gpiod_get_value()
Browse files Browse the repository at this point in the history
The commit 8522d62 ("staging: wfx: gpiod_get_value() can return an
error") has changed the way the driver test the value returned by
gpiod_get_value(). The new code was wrong.

Fixes: 8522d62 ("staging: wfx: gpiod_get_value() can return an error")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20201019160604.1609180-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jérôme Pouiller authored and Greg Kroah-Hartman committed Oct 27, 2020
1 parent d3a8573 commit df5fbca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/wfx/bh.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static void device_wakeup(struct wfx_dev *wdev)

if (!wdev->pdata.gpio_wakeup)
return;
if (gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup) >= 0)
if (gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup) > 0)
return;

if (wfx_api_older_than(wdev, 1, 4)) {
Expand Down

0 comments on commit df5fbca

Please sign in to comment.