diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-02-12 23:47:17 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-02-14 20:58:13 +0100 |
commit | 2cc8212198820487ec3fdcc7b98133701fc9dfc3 (patch) | |
tree | e4e81b3f8b537aa7f6aa4960dae86bbe04f7dc06 /drivers/rtc/rtc-core.h | |
parent | rtc: nvmem: pass nvmem_config to rtc_nvmem_register() (diff) | |
download | linux-2cc8212198820487ec3fdcc7b98133701fc9dfc3.tar.xz linux-2cc8212198820487ec3fdcc7b98133701fc9dfc3.zip |
rtc: nvmem: return error values
In case of error, make rtc_nvmem_register() able to return an error value
to its caller.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-core.h')
-rw-r--r-- | drivers/rtc/rtc-core.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-core.h b/drivers/rtc/rtc-core.h index 5f60e3b11cde..05a67837fd76 100644 --- a/drivers/rtc/rtc-core.h +++ b/drivers/rtc/rtc-core.h @@ -48,11 +48,14 @@ static inline const struct attribute_group **rtc_get_dev_attribute_groups(void) #endif #ifdef CONFIG_RTC_NVMEM -void rtc_nvmem_register(struct rtc_device *rtc, - struct nvmem_config *nvmem_config); +int rtc_nvmem_register(struct rtc_device *rtc, + struct nvmem_config *nvmem_config); void rtc_nvmem_unregister(struct rtc_device *rtc); #else -static inline void rtc_nvmem_register(struct rtc_device *rtc, - struct nvmem_config *nvmem_config) {} +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 |