]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit07e615f6b27fdfa3563fcd0c9ee2c2cd7bc33a98
treeefe5e8ee4667aa49c34f1ef2653067206297f2da
parent717f79b20084d664e0f84d594ea77f9e172bf0fd
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