From: David Brownell Date: Tue, 8 May 2007 07:33:45 +0000 (-0700) Subject: RTC: replace some newly-introduced macros with inlines X-Git-Tag: v2.6.22-rc1~564 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61a7c36acb3da406d64c0da6288eab1c414a65ea;p=linux-2.6 RTC: replace some newly-introduced macros with inlines Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-core.h b/drivers/rtc/rtc-core.h index 4675a9fd5b..d81a278fcd 100644 --- a/drivers/rtc/rtc-core.h +++ b/drivers/rtc/rtc-core.h @@ -7,22 +7,38 @@ extern void rtc_dev_del_device(struct rtc_device *rtc); #else -#define rtc_dev_init() do{}while(0) -#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_init(void) +{ +} + +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 #ifdef CONFIG_RTC_INTF_PROC -void rtc_proc_add_device(struct rtc_device *rtc); -void rtc_proc_del_device(struct rtc_device *rtc); +extern void rtc_proc_add_device(struct rtc_device *rtc); +extern void rtc_proc_del_device(struct rtc_device *rtc); #else -#define rtc_proc_add_device(r) do{}while(0) -#define rtc_proc_del_device(r) do{}while(0) +static inline void rtc_proc_add_device(struct rtc_device *rtc) +{ +} + +static inline void rtc_proc_del_device(struct rtc_device *rtc) +{ +} #endif @@ -34,8 +50,16 @@ extern void rtc_sysfs_del_device(struct rtc_device *rtc); #else -#define rtc_sysfs_init(c) do{}while(0) -#define rtc_sysfs_add_device(r) do{}while(0) -#define rtc_sysfs_del_device(r) do{}while(0) +static inline void rtc_sysfs_init(struct class *rtc) +{ +} + +static inline void rtc_sysfs_add_device(struct rtc_device *rtc) +{ +} + +static inline void rtc_sysfs_del_device(struct rtc_device *rtc) +{ +} #endif