From 9926154ce0ebffcaae21a8c480556656eca920b8 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Tue, 8 May 2007 00:33:45 -0700 Subject: [PATCH] --- yaml --- r: 54772 b: refs/heads/master c: 61a7c36acb3da406d64c0da6288eab1c414a65ea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/rtc/rtc-core.h | 46 +++++++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index f9eb12bad79f..f49663778d17 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ca1d488ffe4817adaba61cc05b972782f7d3f91 +refs/heads/master: 61a7c36acb3da406d64c0da6288eab1c414a65ea diff --git a/trunk/drivers/rtc/rtc-core.h b/trunk/drivers/rtc/rtc-core.h index 4675a9fd5b14..d81a278fcded 100644 --- a/trunk/drivers/rtc/rtc-core.h +++ b/trunk/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