]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
zorro: stop creating attributes by hand
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 14 Feb 2017 20:24:09 +0000 (12:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 06:10:49 +0000 (15:10 +0900)
commit87e715deb8e24bf1a6a9a1babaf465c28c93889c
tree301f21d1a648dc9a84c1eb65df4c2e77fc79cb4a
parenta553910fbaafbd7c18823c0f1e5dcc2d12c9fd2a
zorro: stop creating attributes by hand

Instead of creating attributes one by one, define attribute_group array
and attach it to bus->dev_groups, so that all needed attributes are created
automatically when a new device is registered on the bus.

Also switch to using standard DEVICE_ATTR_RO() macros.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/zorro/zorro-driver.c
drivers/zorro/zorro-sysfs.c
drivers/zorro/zorro.c
drivers/zorro/zorro.h