]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0a34f18dc61e2ff2cc55380d3d4ccb8d864e983f
tree5b09c984a18dc30aa6d20670b3c50753ecd103c9
parent3ecf95b02cbbdb0fab0ff60668da1931fd49c625
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