iio: Introduce iio_device_{set,get}_drvdata()
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 27 Aug 2012 16:52:26 +0000 (17:52 +0100)
commit2d66f389ccf2c3ffea93c0270ef34186e4995333
tree6942c3c11162169838ea0021b5cad8e4961715e0
parent49f8812e4d15970341f0ed320e78951cc16b596d
iio: Introduce iio_device_{set,get}_drvdata()

Introduce two new helper functions to attach a arbitrary pointer to a IIO
device. This is useful to get access to external non-global data from within a
IIO device callbacks where only the IIO device is available.

Internally these functions use dev_{set,get}_drvdata() on the struct device
embedded in the IIO device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
include/linux/iio/iio.h