aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-12 23:47:19 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-01 10:49:15 +0100
commitfd5cd21d995e67f87b3eb4adf938be85fe83ef4b (patch)
tree4b79b8f29e8ad0c59100019a747681fa508964d2 /drivers/rtc
parentrtc: nvmem: allow registering the nvmem device before the rtc (diff)
downloadlinux-dev-fd5cd21d995e67f87b3eb4adf938be85fe83ef4b.tar.xz
linux-dev-fd5cd21d995e67f87b3eb4adf938be85fe83ef4b.zip
rtc: export rtc_nvmem_register() to drivers
Export rtc_nvmem_register() so it can be called from drivers instead of only the core. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/nvmem.c3
-rw-r--r--drivers/rtc/rtc-core.h13
2 files changed, 1 insertions, 15 deletions
diff --git a/drivers/rtc/nvmem.c b/drivers/rtc/nvmem.c
index eb8c622cfcf4..17ec4c8d0fad 100644
--- a/drivers/rtc/nvmem.c
+++ b/drivers/rtc/nvmem.c
@@ -14,8 +14,6 @@
#include <linux/rtc.h>
#include <linux/sysfs.h>
-#include "rtc-core.h"
-
/*
* Deprecated ABI compatibility, this should be removed at some point
*/
@@ -105,6 +103,7 @@ int rtc_nvmem_register(struct rtc_device *rtc,
return 0;
}
+EXPORT_SYMBOL_GPL(rtc_nvmem_register);
void rtc_nvmem_unregister(struct rtc_device *rtc)
{
diff --git a/drivers/rtc/rtc-core.h b/drivers/rtc/rtc-core.h
index 05a67837fd76..0abf98983e13 100644
--- a/drivers/rtc/rtc-core.h
+++ b/drivers/rtc/rtc-core.h
@@ -46,16 +46,3 @@ static inline const struct attribute_group **rtc_get_dev_attribute_groups(void)
return NULL;
}
#endif
-
-#ifdef CONFIG_RTC_NVMEM
-int rtc_nvmem_register(struct rtc_device *rtc,
- struct nvmem_config *nvmem_config);
-void rtc_nvmem_unregister(struct rtc_device *rtc);
-#else
-static inline int rtc_nvmem_register(struct rtc_device *rtc,
- struct nvmem_config *nvmem_config)
-{
- return -ENODEV;
-}
-static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {}
-#endif