]> git.baikalelectronics.ru Git - kernel.git/commit
iio: at91-sama5d2: Use dev_to_iio_dev() in sysfs callbacks
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 19 Oct 2021 08:29:29 +0000 (10:29 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:39 +0000 (17:51 +0000)
commitd4c7678d1b00b7af1fad42e49e98b2608c7e93ed
tree144571b61836a0a46765a585a643a99e664b71d5
parentbc0d0fba1226ce2dba37c11fc620039e57fc35a5
iio: at91-sama5d2: Use dev_to_iio_dev() in sysfs callbacks

Using `dev_get_drvdata()` in IIO sysfs callbacks to get a pointer to the
IIO device is a relic from the very early days of IIO. The IIO core as well
as most other drivers have switched over to using `dev_to_iio_dev()`
instead.

This driver is one of the last few drivers remaining that uses the outdated
idiom, update it. This will allow to eventually update the IIO core to no
longer set the drvdata for the IIO device and free it up for driver usage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211019082929.30503-2-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c