]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 12 Mar 2023 21:09:33 +0000 (14:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Apr 2023 14:55:27 +0000 (16:55 +0200)
commitc723a410a497048a069e4125136486f1f357da7a
treefa6166f853384cf36c320cbe472ce3ab36f83ca7
parenta09eb53a18f92ac60a1e0ab413cc45b779e92ac1
iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip

commit 363c7dc72f79edd55bf1c4380e0fbf7f1bbc2c86 upstream.

The ads7950 uses a mutex as well as SPI transfers in its GPIO callbacks.
This means these callbacks can sleep and the `can_sleep` flag should be
set.

Having the flag set will make sure that warnings are generated when calling
any of the callbacks from a potentially non-sleeping context.

Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: David Lechner <david@lechnology.com>
Link: https://lore.kernel.org/r/20230312210933.2275376-1-lars@metafoo.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ti-ads7950.c