diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-04-26 18:17:35 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-05-20 06:33:51 -0400 |
commit | 6fca3fc51632685635cb7143065ae74d44673871 (patch) | |
tree | d9cb87ff15bee0e467549d08749b504567ee2d93 | |
parent | b4b77f3c280e38cec178f81d7a4d7e65f4045913 (diff) |
rtc: Use IS_ENABLED() instead of checking for built-in or module
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-mrst.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-rs5c372.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 84fb541038be..fbe9c72438e1 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -401,7 +401,7 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
401 | return 0; | 401 | return 0; |
402 | } | 402 | } |
403 | 403 | ||
404 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | 404 | #if IS_ENABLED(CONFIG_RTC_INTF_PROC) |
405 | 405 | ||
406 | static int cmos_procfs(struct device *dev, struct seq_file *seq) | 406 | static int cmos_procfs(struct device *dev, struct seq_file *seq) |
407 | { | 407 | { |
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c index 548ea6f6f384..0094d9bdd1e6 100644 --- a/drivers/rtc/rtc-mrst.c +++ b/drivers/rtc/rtc-mrst.c | |||
@@ -266,7 +266,7 @@ static int mrst_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
266 | } | 266 | } |
267 | 267 | ||
268 | 268 | ||
269 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | 269 | #if IS_ENABLED(CONFIG_RTC_INTF_PROC) |
270 | 270 | ||
271 | static int mrst_procfs(struct device *dev, struct seq_file *seq) | 271 | static int mrst_procfs(struct device *dev, struct seq_file *seq) |
272 | { | 272 | { |
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 12270c789088..aaebe10876e8 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c | |||
@@ -237,11 +237,11 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) | |||
237 | return 0; | 237 | return 0; |
238 | } | 238 | } |
239 | 239 | ||
240 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | 240 | #if IS_ENABLED(CONFIG_RTC_INTF_PROC) |
241 | #define NEED_TRIM | 241 | #define NEED_TRIM |
242 | #endif | 242 | #endif |
243 | 243 | ||
244 | #if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE) | 244 | #if IS_ENABLED(CONFIG_RTC_INTF_SYSFS) |
245 | #define NEED_TRIM | 245 | #define NEED_TRIM |
246 | #endif | 246 | #endif |
247 | 247 | ||
@@ -409,7 +409,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t) | |||
409 | return 0; | 409 | return 0; |
410 | } | 410 | } |
411 | 411 | ||
412 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | 412 | #if IS_ENABLED(CONFIG_RTC_INTF_PROC) |
413 | 413 | ||
414 | static int rs5c372_rtc_proc(struct device *dev, struct seq_file *seq) | 414 | static int rs5c372_rtc_proc(struct device *dev, struct seq_file *seq) |
415 | { | 415 | { |
@@ -438,7 +438,7 @@ static const struct rtc_class_ops rs5c372_rtc_ops = { | |||
438 | .alarm_irq_enable = rs5c_rtc_alarm_irq_enable, | 438 | .alarm_irq_enable = rs5c_rtc_alarm_irq_enable, |
439 | }; | 439 | }; |
440 | 440 | ||
441 | #if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE) | 441 | #if IS_ENABLED(CONFIG_RTC_INTF_SYSFS) |
442 | 442 | ||
443 | static ssize_t rs5c372_sysfs_show_trim(struct device *dev, | 443 | static ssize_t rs5c372_sysfs_show_trim(struct device *dev, |
444 | struct device_attribute *attr, char *buf) | 444 | struct device_attribute *attr, char *buf) |