staging:iio:trigger handle name attr in core, remove old alloc and register any contr...
authorJonathan Cameron <jic23@cam.ac.uk>
Wed, 18 May 2011 13:42:22 +0000 (14:42 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 19 May 2011 23:15:02 +0000 (16:15 -0700)
commit59c85e82c2e7a672cb4342dc5ccf9df8a3a14f73
tree7df58c13e2254bf55692a20841bc3553583d11ef
parent3b8ebfb47f0cacc82c88b6f886ad84d78d6fdd61
staging:iio:trigger handle name attr in core, remove old alloc and register any control_attrs via struct device

As the majority of triggers don't actually have any other control_attrs lets use the fact
that struct device has a groups element when we do need to have these attributes registered.
A vargs function is used to cut down on lots of building strings in every single driver
just in order to pass them into the allocate.

Also iio_allocate_trigger_named -> iio_allocate_trigger as there is no
unamed version any more, so that is now just confusing.

Blackfin tested and fixed by Michael Hennerich.

V2: Elements from Michael Hennerich's patches for the ade7758

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 files changed:
drivers/staging/iio/accel/adis16201_trigger.c
drivers/staging/iio/accel/adis16203_trigger.c
drivers/staging/iio/accel/adis16204_trigger.c
drivers/staging/iio/accel/adis16209_trigger.c
drivers/staging/iio/accel/adis16240_trigger.c
drivers/staging/iio/accel/lis3l02dq_ring.c
drivers/staging/iio/gyro/adis16260_trigger.c
drivers/staging/iio/imu/adis16400_trigger.c
drivers/staging/iio/industrialio-trigger.c
drivers/staging/iio/meter/ade7758_trigger.c
drivers/staging/iio/trigger.h
drivers/staging/iio/trigger/iio-trig-bfin-timer.c
drivers/staging/iio/trigger/iio-trig-gpio.c
drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
drivers/staging/iio/trigger/iio-trig-sysfs.c