mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-01 23:53:16 -04:00
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>
This commit is contained in:
parent
ac75779b72
commit
fd5cd21d99
3 changed files with 14 additions and 15 deletions
|
@ -271,4 +271,17 @@ extern int rtc_hctosys_ret;
|
|||
#define rtc_hctosys_ret -ENODEV
|
||||
#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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue