mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
gpio / ACPI: use *_cansleep version of gpiod_get/set APIs
The GPIO operation region handler should be called where sleep is allowed, so we should use the *_cansleep version of gpiod_get/set APIs or we will get a warning message complaining invalid context if the GPIO chip has the cansleep flag set. Signed-off-by: Aaron Lu <[email protected]> Acked-by: Mika Westerberg <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
7b42e3dbda
commit
dc62b56a68
1 changed files with 3 additions and 2 deletions
|
|
@ -449,9 +449,10 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
|
|||
mutex_unlock(&achip->conn_lock);
|
||||
|
||||
if (function == ACPI_WRITE)
|
||||
gpiod_set_raw_value(desc, !!((1 << i) & *value));
|
||||
gpiod_set_raw_value_cansleep(desc,
|
||||
!!((1 << i) & *value));
|
||||
else
|
||||
*value |= (u64)gpiod_get_raw_value(desc) << i;
|
||||
*value |= (u64)gpiod_get_raw_value_cansleep(desc) << i;
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue