Commit 61a7c36a authored by David Brownell's avatar David Brownell Committed by Linus Torvalds

RTC: replace some newly-introduced macros with inlines

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7ca1d488
...@@ -7,22 +7,38 @@ extern void rtc_dev_del_device(struct rtc_device *rtc); ...@@ -7,22 +7,38 @@ extern void rtc_dev_del_device(struct rtc_device *rtc);
#else #else
#define rtc_dev_init() do{}while(0) static inline void rtc_dev_init(void)
#define rtc_dev_exit() do{}while(0) {
#define rtc_dev_add_device(r) do{}while(0) }
#define rtc_dev_del_device(r) do{}while(0)
static inline void rtc_dev_exit(void)
{
}
static inline void rtc_dev_add_device(struct rtc_device *rtc)
{
}
static inline void rtc_dev_del_device(struct rtc_device *rtc)
{
}
#endif #endif
#ifdef CONFIG_RTC_INTF_PROC #ifdef CONFIG_RTC_INTF_PROC
void rtc_proc_add_device(struct rtc_device *rtc); extern void rtc_proc_add_device(struct rtc_device *rtc);
void rtc_proc_del_device(struct rtc_device *rtc); extern void rtc_proc_del_device(struct rtc_device *rtc);
#else #else
#define rtc_proc_add_device(r) do{}while(0) static inline void rtc_proc_add_device(struct rtc_device *rtc)
#define rtc_proc_del_device(r) do{}while(0) {
}
static inline void rtc_proc_del_device(struct rtc_device *rtc)
{
}
#endif #endif
...@@ -34,8 +50,16 @@ extern void rtc_sysfs_del_device(struct rtc_device *rtc); ...@@ -34,8 +50,16 @@ extern void rtc_sysfs_del_device(struct rtc_device *rtc);
#else #else
#define rtc_sysfs_init(c) do{}while(0) static inline void rtc_sysfs_init(struct class *rtc)
#define rtc_sysfs_add_device(r) do{}while(0) {
#define rtc_sysfs_del_device(r) do{}while(0) }
static inline void rtc_sysfs_add_device(struct rtc_device *rtc)
{
}
static inline void rtc_sysfs_del_device(struct rtc_device *rtc)
{
}
#endif #endif
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