Home
last modified time | relevance | path

Searched hist:"4498863 c" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/iio/common/st_sensors/
H A Dst_sensors_core.c4498863c Wed Oct 20 03:53:49 CDT 2021 Lars-Peter Clausen <lars@metafoo.de> iio: st-sensors: 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/20211020085349.16178-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>