OSDN Git Service

rtc: ds1307: use rtc_add_group
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 20 Sep 2018 14:35:26 +0000 (16:35 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 28 Sep 2018 12:21:01 +0000 (14:21 +0200)
commit6a5f2a1f4dcdb31fde467d9ae612505692eb4243
treec9468825c5b51dd5a08d31d4ebc211faedfe5f87
parentcfb74916e2ecf018e3189959edd2a1356b2fd89e
rtc: ds1307: use rtc_add_group

Register frequency test using rtc_add_group to avoid a possible race
condition and simplify the code.

This also moves the attribute to its proper location under the rtc device
instead of the i2c parent device.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1307.c