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>
This commit is contained in:
Alexandre Belloni 2018-02-12 23:47:20 +01:00
parent fd5cd21d99
commit 6910614f1e
1 changed files with 2 additions and 2 deletions

View File

@ -703,15 +703,15 @@ static int ds1305_probe(struct spi_device *spi)
ds1305->rtc->ops = &ds1305_ops; ds1305->rtc->ops = &ds1305_ops;
ds1305_nvmem_cfg.priv = ds1305; ds1305_nvmem_cfg.priv = ds1305;
ds1305->rtc->nvmem_config = &ds1305_nvmem_cfg;
ds1305->rtc->nvram_old_abi = true; ds1305->rtc->nvram_old_abi = true;
status = rtc_register_device(ds1305->rtc); status = rtc_register_device(ds1305->rtc);
if (status) { if (status) {
dev_dbg(&spi->dev, "register rtc --> %d\n", status); dev_dbg(&spi->dev, "register rtc --> %d\n", status);
return status; return status;
} }
rtc_nvmem_register(ds1305->rtc, &ds1305_nvmem_cfg);
/* Maybe set up alarm IRQ; be ready to handle it triggering right /* 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, * 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 * and we can't ack it before a SPI message delay. We temporarily