aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1305.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-12 23:47:20 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-01 10:49:15 +0100
commit6910614f1e2806f43d0237a3566f83bfbee33440 (patch)
tree4ca2fd6a7f163b2dabc27f37efcac443b1bc0c27 /drivers/rtc/rtc-ds1305.c
parentfd5cd21d995e67f87b3eb4adf938be85fe83ef4b (diff)
downloadlinux-6910614f1e2806f43d0237a3566f83bfbee33440.tar.gz
rtc: ds1305: call rtc_nvmem_register()
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1305.c')
-rw-r--r--drivers/rtc/rtc-ds1305.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index d8df2e9e14adb..affa90da26f16 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -703,15 +703,15 @@ static int ds1305_probe(struct spi_device *spi)
ds1305->rtc->ops = &ds1305_ops;
ds1305_nvmem_cfg.priv = ds1305;
- ds1305->rtc->nvmem_config = &ds1305_nvmem_cfg;
ds1305->rtc->nvram_old_abi = true;
-
status = rtc_register_device(ds1305->rtc);
if (status) {
dev_dbg(&spi->dev, "register rtc --> %d\n", status);
return status;
}
+ rtc_nvmem_register(ds1305->rtc, &ds1305_nvmem_cfg);
+
/* Maybe set up alarm IRQ; be ready to handle it triggering right
* away. NOTE that we don't share this. The signal is active low,
* and we can't ack it before a SPI message delay. We temporarily