diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2016-03-07 00:27:51 +0900 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-03-14 17:08:37 +0100 |
commit | 7522297e1638f985e5d52f34b871e742b10586d4 (patch) | |
tree | 450d80286d875a5769f00c2e0ed24da0c2a7f75d /drivers/rtc/rtc-ds3232.c | |
parent | 7b4393a62f784bdd295c397c640cd93238ded0be (diff) | |
download | linux-7522297e1638f985e5d52f34b871e742b10586d4.tar.bz2 |
rtc: ds3232: remove unused UIE code
UIE mode irqs are handled by the generic rtc core now. But there are
remaining unused code fragments for it.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-ds3232.c')
-rw-r--r-- | drivers/rtc/rtc-ds3232.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 321b8670ff7a..f0ffd3f5d8f5 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -279,32 +279,14 @@ static int ds3232_update_alarm(struct device *dev, unsigned int enabled) struct ds3232 *ds3232 = dev_get_drvdata(dev); int control; int ret; - u8 buf[4]; mutex_lock(&ds3232->mutex); - ret = regmap_bulk_read(ds3232->regmap, DS3232_REG_ALARM1, buf, 4); - if (ret) - goto unlock; - - buf[0] = bcd2bin(buf[0]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[0]; - buf[1] = bcd2bin(buf[1]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[1]; - buf[2] = bcd2bin(buf[2]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[2]; - buf[3] = bcd2bin(buf[3]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[3]; - - ret = regmap_bulk_write(ds3232->regmap, DS3232_REG_ALARM1, buf, 4); - if (ret) - goto unlock; - ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control); if (ret) goto unlock; - if (enabled || (ds3232->rtc->irq_data & RTC_UF)) + if (enabled) /* enable alarm1 interrupt */ control |= DS3232_REG_CR_A1IE; else |