Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: light: st_uvis25: Switch to sparse friendly iio_device_claim/release_direct()

These new functions allow sparse to find failures to release
direct mode reducing chances of bugs over the claim_direct_mode()
functions that are deprecated.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250309170633.1347476-15-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+3 -4
+3 -4
drivers/iio/light/st_uvis25_core.c
··· 117 117 { 118 118 int ret; 119 119 120 - ret = iio_device_claim_direct_mode(iio_dev); 121 - if (ret) 122 - return ret; 120 + if (!iio_device_claim_direct(iio_dev)) 121 + return -EBUSY; 123 122 124 123 switch (mask) { 125 124 case IIO_CHAN_INFO_PROCESSED: { ··· 143 144 break; 144 145 } 145 146 146 - iio_device_release_direct_mode(iio_dev); 147 + iio_device_release_direct(iio_dev); 147 148 148 149 return ret; 149 150 }