summaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-25 08:58:00 +0000
committerJonathan Cameron <jic23@kernel.org>2013-03-25 21:06:10 +0000
commit5034bfc976928b447cb6decd311d35161107a72f (patch)
treebfc4181c8d2c41449fd9e3a5becd1e15c245bae6 /include/linux/iio
parent1e9663c62b32f695af37fec4afc473b59f5ca9b4 (diff)
downloadop-kernel-dev-5034bfc976928b447cb6decd311d35161107a72f.zip
op-kernel-dev-5034bfc976928b447cb6decd311d35161107a72f.tar.gz
iio:trigger: Use dev_{set,get}_drvdata for private data management
Use dev_{set,get}_drvdata for managing private data attached to a trigger instead of using a custom field in the iio_trigger struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/trigger.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index b81948a..3869c52 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -44,7 +44,6 @@ struct iio_trigger_ops {
* @id: [INTERN] unique id number
* @name: [DRIVER] unique name
* @dev: [DRIVER] associated device (if relevant)
- * @private_data: [DRIVER] device specific data
* @list: [INTERN] used in maintenance of global trigger list
* @alloc_list: [DRIVER] used for driver specific trigger list
* @use_count: use count for the trigger
@@ -60,7 +59,6 @@ struct iio_trigger {
const char *name;
struct device dev;
- void *private_data;
struct list_head list;
struct list_head alloc_list;
int use_count;
@@ -101,7 +99,7 @@ static inline void iio_trigger_get(struct iio_trigger *trig)
*/
static inline void iio_trigger_set_drvdata(struct iio_trigger *trig, void *data)
{
- trig->private_data = data;
+ dev_set_drvdata(&trig->dev, data);
}
/**
@@ -112,7 +110,7 @@ static inline void iio_trigger_set_drvdata(struct iio_trigger *trig, void *data)
*/
static inline void *iio_trigger_get_drvdata(struct iio_trigger *trig)
{
- return trig->private_data;
+ return dev_get_drvdata(&trig->dev);
}
/**
OpenPOWER on IntegriCloud