diff options
author | Loic Poulain <loic.poulain@linaro.org> | 2018-03-05 19:02:35 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2018-04-01 14:25:30 +0200 |
commit | fb2d466be9b336e9c801978e6a75d06059ac124a (patch) | |
tree | aa830282c68b9a03e628e64106511a6f335b0b13 /drivers/bluetooth/hci_bcm.c | |
parent | 8c59c264e5e17670c0ad2063fa40e3091b549151 (diff) | |
download | linux-fb2d466be9b336e9c801978e6a75d06059ac124a.tar.gz linux-fb2d466be9b336e9c801978e6a75d06059ac124a.tar.bz2 linux-fb2d466be9b336e9c801978e6a75d06059ac124a.zip |
Bluetooth: hci_bcm: use gpiod cansleep version
Some GPIO controller drivers request sleepable context and so can't
be accessed from IRQ context. Using gpiod_set/get_value accessors
with such controller leads to a kernel warning since they are
reserved for atomic context (according to the documentation).
Use the postfixed _cansleep version instead, indicating that context
is safe for sleeping if necessary. Note that this is the case here
since we never toggle the gpio neither from IRQ nor from a spinlocked
section.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_bcm.c')
-rw-r--r-- | drivers/bluetooth/hci_bcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 40b9fb247010..467e2f5cb7e3 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -908,13 +908,13 @@ static inline int bcm_apple_get_resources(struct bcm_device *dev) static int bcm_gpio_set_device_wakeup(struct bcm_device *dev, bool awake) { - gpiod_set_value(dev->device_wakeup, awake); + gpiod_set_value_cansleep(dev->device_wakeup, awake); return 0; } static int bcm_gpio_set_shutdown(struct bcm_device *dev, bool powered) { - gpiod_set_value(dev->shutdown, powered); + gpiod_set_value_cansleep(dev->shutdown, powered); return 0; } |