diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-09-02 17:14:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 16:02:01 -0700 |
commit | 26d25ae3f0d8ffe350aacc75b71198d6b35bd1f4 (patch) | |
tree | 8b7867c7cfb8202e5313c462256ebf7e9932a1f1 /drivers/staging/iio/industrialio-trigger.c | |
parent | 330c6c57e6284a755d7e8a031b3c917571ee6dc3 (diff) | |
download | op-kernel-dev-26d25ae3f0d8ffe350aacc75b71198d6b35bd1f4.zip op-kernel-dev-26d25ae3f0d8ffe350aacc75b71198d6b35bd1f4.tar.gz |
staging:iio: rework of attribute registration.
This set also includes quite a number of bug fixes of particularly
remove functions.
Necessary due to issue pointed out in Bart Van Assche's patch:
docs/driver-model: Document device.groups
V2: Rebase due to patch reordering.
V3: Pull various error fixes and cleanups out into their own patches.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/industrialio-trigger.c')
-rw-r--r-- | drivers/staging/iio/industrialio-trigger.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/iio/industrialio-trigger.c b/drivers/staging/iio/industrialio-trigger.c index 3e60406..a66dcf7 100644 --- a/drivers/staging/iio/industrialio-trigger.c +++ b/drivers/staging/iio/industrialio-trigger.c @@ -475,8 +475,10 @@ EXPORT_SYMBOL(iio_free_trigger); int iio_device_register_trigger_consumer(struct iio_dev *dev_info) { - return sysfs_create_group(&dev_info->dev.kobj, - &iio_trigger_consumer_attr_group); + dev_info->groups[dev_info->groupcounter++] = + &iio_trigger_consumer_attr_group; + + return 0; } void iio_device_unregister_trigger_consumer(struct iio_dev *dev_info) @@ -484,8 +486,6 @@ void iio_device_unregister_trigger_consumer(struct iio_dev *dev_info) /* Clean up and associated but not attached triggers references */ if (dev_info->trig) iio_put_trigger(dev_info->trig); - sysfs_remove_group(&dev_info->dev.kobj, - &iio_trigger_consumer_attr_group); } int iio_triggered_ring_postenable(struct iio_dev *indio_dev) |