diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-02-12 23:47:19 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-03-01 10:49:15 +0100 |
commit | fd5cd21d995e67f87b3eb4adf938be85fe83ef4b (patch) | |
tree | 4b79b8f29e8ad0c59100019a747681fa508964d2 /drivers | |
parent | ac75779b72fd52741d7446ad27cf6d58c006c643 (diff) |
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')
-rw-r--r-- | drivers/rtc/nvmem.c | 3 | ||||
-rw-r--r-- | drivers/rtc/rtc-core.h | 13 |
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 |