Commit fd5cd21d authored by Alexandre Belloni's avatar Alexandre Belloni

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: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ac75779b
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include "rtc-core.h"
/* /*
* Deprecated ABI compatibility, this should be removed at some point * Deprecated ABI compatibility, this should be removed at some point
*/ */
...@@ -105,6 +103,7 @@ int rtc_nvmem_register(struct rtc_device *rtc, ...@@ -105,6 +103,7 @@ int rtc_nvmem_register(struct rtc_device *rtc,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(rtc_nvmem_register);
void rtc_nvmem_unregister(struct rtc_device *rtc) void rtc_nvmem_unregister(struct rtc_device *rtc)
{ {
......
...@@ -46,16 +46,3 @@ static inline const struct attribute_group **rtc_get_dev_attribute_groups(void) ...@@ -46,16 +46,3 @@ static inline const struct attribute_group **rtc_get_dev_attribute_groups(void)
return NULL; return NULL;
} }
#endif #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
...@@ -271,4 +271,17 @@ extern int rtc_hctosys_ret; ...@@ -271,4 +271,17 @@ extern int rtc_hctosys_ret;
#define rtc_hctosys_ret -ENODEV #define rtc_hctosys_ret -ENODEV
#endif #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
#endif /* _LINUX_RTC_H_ */ #endif /* _LINUX_RTC_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment