diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 10:42:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 10:42:11 -0700 |
commit | 63d222b9d277c4d7bf08afd1631a7f8e327a825c (patch) | |
tree | 5a7167eebe02730c62b3137c9b9e89fa45329db7 /drivers/rtc/rtc-rs5c372.c | |
parent | 10cd7158042bf9c949c19dbf0c7ee600d198ed39 (diff) | |
parent | b9ba1eb0336877b9b83556fd30d2becda110fd8c (diff) |
Merge tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"Subsystem wide cleanups:
- Use IS_ENABLED() instead of checking for built-in or module
- remove useless DRV_VERSION
- remove CLK_IS_ROOT
- remove UIE signaling
Drivers:
- ds1302: rewritten to be a proper SPI device driver
- m41t80: huge cleanup, alarm, wakelarm ans oscialltor failure
detection support
- rv3029: switch to regmap to handle rv3049, alarm support, fixes
- zynqmp: enable switching to battery power, fixes
- small fixes for at91sam9, da9053, ds1307, ds1685, ds3232, r2025,
sa1100, snvs, stmp3xxx, tps6586x"
* tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (40 commits)
rtc: tps6586x: rename so module can be autoloaded
rtc: rv3029: hide unused i2c device table
rtc: rs5c372: r2025: fix check for 'oscillator halted' condition
rtc: rv3029: add alarm IRQ
rtc: rv3029: fix set_time function
rtc: rv3029: fix alarm support
rtc: rv3029: Remove some checks and warnings
rtc: rv3029: Add support of RV3049
rtc: rv3029: convert to use regmap
rtc: rv3029: remove 'i2c' in functions names
rtc: stmp3xxx: print message on error
rtc: Use IS_ENABLED() instead of checking for built-in or module
rtc: ds3232: fix call trace when rtc->ops_lock is used as NULL
rtc: snvs: return error in case enable_irq_wake fails
rtc: zynqmp: Update seconds time programming logic
rtc: sa1100: DT spelling s/interrupt-name/interrupt-names/
rtc: mc13xxx: remove UIE signaling
rtc: mxc: remove UIE signaling
rtc: ds1307: Remove CLK_IS_ROOT
rtc: hym8563: Remove CLK_IS_ROOT
...
Diffstat (limited to 'drivers/rtc/rtc-rs5c372.c')
-rw-r--r-- | drivers/rtc/rtc-rs5c372.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 28871cd7e3b5..ef86229428fc 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -16,9 +16,6 @@ #include <linux/slab.h> #include <linux/module.h> -#define DRV_VERSION "0.6" - - /* * Ricoh has a family of I2C based RTCs, which differ only slightly from * each other. Differences center on pinout (e.g. how many interrupts, @@ -240,11 +237,11 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) return 0; } -#if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) +#if IS_ENABLED(CONFIG_RTC_INTF_PROC) #define NEED_TRIM #endif -#if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE) +#if IS_ENABLED(CONFIG_RTC_INTF_SYSFS) #define NEED_TRIM #endif @@ -412,7 +409,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t) return 0; } -#if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) +#if IS_ENABLED(CONFIG_RTC_INTF_PROC) static int rs5c372_rtc_proc(struct device *dev, struct seq_file *seq) { @@ -441,7 +438,7 @@ static const struct rtc_class_ops rs5c372_rtc_ops = { .alarm_irq_enable = rs5c_rtc_alarm_irq_enable, }; -#if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE) +#if IS_ENABLED(CONFIG_RTC_INTF_SYSFS) static ssize_t rs5c372_sysfs_show_trim(struct device *dev, struct device_attribute *attr, char *buf) @@ -509,9 +506,9 @@ static int rs5c_oscillator_setup(struct rs5c372 *rs5c372) int addr, i, ret = 0; if (rs5c372->type == rtc_r2025sd) { - if (!(rs5c372->regs[RS5C_REG_CTRL2] & R2025_CTRL2_XST)) + if (rs5c372->regs[RS5C_REG_CTRL2] & R2025_CTRL2_XST) return ret; - rs5c372->regs[RS5C_REG_CTRL2] &= ~R2025_CTRL2_XST; + rs5c372->regs[RS5C_REG_CTRL2] |= R2025_CTRL2_XST; } else { if (!(rs5c372->regs[RS5C_REG_CTRL2] & RS5C_CTRL2_XSTP)) return ret; @@ -640,7 +637,7 @@ static int rs5c372_probe(struct i2c_client *client, if (rs5c372_get_datetime(client, &tm) < 0) dev_warn(&client->dev, "clock needs to be set\n"); - dev_info(&client->dev, "%s found, %s, driver version " DRV_VERSION "\n", + dev_info(&client->dev, "%s found, %s\n", ({ char *s; switch (rs5c372->type) { case rtc_r2025sd: s = "r2025sd"; break; case rtc_r2221tl: s = "r2221tl"; break; @@ -696,4 +693,3 @@ MODULE_AUTHOR( "Paul Mundt <lethal@linux-sh.org>"); MODULE_DESCRIPTION("Ricoh RS5C372 RTC driver"); MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); |