rtc: switch to using is_visible() to control sysfs attributes
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 23 Jul 2015 23:01:08 +0000 (16:01 -0700)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:07 +0000 (13:19 +0200)
commit3ee2c40b7ac2bf121aaa1176d8ac25b6a26e3a94
treeefe5e8ee4667aa49c34f1ef2653067206297f2da
parenta17ccd1c6a327e5b468358e8352a6af004261473
rtc: switch to using is_visible() to control sysfs attributes

Instead of creating wakealarm attribute manually, after the device has been
registered, let's rely on facilities provided by the attribute groups to
control which attributes are visible and which are not. This allows to
create all needed attributes at once, at the same time that we register RTC
class device.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/class.c
drivers/rtc/rtc-core.h
drivers/rtc/rtc-sysfs.c