summaryrefslogtreecommitdiff
path: root/drivers/rtc/nvmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/nvmem.c')
-rw-r--r--drivers/rtc/nvmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/nvmem.c b/drivers/rtc/nvmem.c
index fd1c39a5ade5..eb8c622cfcf4 100644
--- a/drivers/rtc/nvmem.c
+++ b/drivers/rtc/nvmem.c
@@ -93,7 +93,7 @@ int rtc_nvmem_register(struct rtc_device *rtc,
if (!nvmem_config)
return -ENODEV;
- nvmem_config->dev = &rtc->dev;
+ nvmem_config->dev = rtc->dev.parent;
nvmem_config->owner = rtc->owner;
rtc->nvmem = nvmem_register(nvmem_config);
if (IS_ERR_OR_NULL(rtc->nvmem))