]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: wcd934x: Fix logic of wcd_gpio_get
authorAxel Lin <axel.lin@ingics.com>
Fri, 31 Jan 2020 12:29:18 +0000 (20:29 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 10 Feb 2020 09:50:58 +0000 (10:50 +0100)
commit949b74e0949043881b6abadca55773649911bfb7
treedab4de05d98b8367984b6ea937bb6f5bfe299611
parentb63758d85fa15f32a9c026a7dcadd6a3d080de35
gpio: wcd934x: Fix logic of wcd_gpio_get

The check with register value and mask should be & rather than &&.
While at it, also use "unsigned int" for value variable because
regmap_read() takes unsigned int *val argument.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-wcd934x.c