iio:trigger: Register sysfs file statically
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 5 Jul 2012 08:57:06 +0000 (10:57 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 8 Jul 2012 09:39:58 +0000 (10:39 +0100)
commit6d459aa011cb087ed1f5c17836b032fcc670e306
tree5b09c984a18dc30aa6d20670b3c50753ecd103c9
parentcf09fe9c873ca0f4e2ca83e7bea03e2599a62d58
iio:trigger: Register sysfs file statically

The name sysfs attribute is the same for all triggers, so there is no need to
register them dynamically at runtime. Create a attribute group for it and set it
up for the bus attribute group. This also avoids a possible race condition
where the uevent for the device is sent before the name sysfs attribute has been
added.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-trigger.c