diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2016-03-06 10:27:51 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-03-14 12:08:37 -0400 |
commit | 7522297e1638f985e5d52f34b871e742b10586d4 (patch) | |
tree | 450d80286d875a5769f00c2e0ed24da0c2a7f75d /drivers/rtc | |
parent | 7b4393a62f784bdd295c397c640cd93238ded0be (diff) |
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')
-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) | |||
279 | struct ds3232 *ds3232 = dev_get_drvdata(dev); | 279 | struct ds3232 *ds3232 = dev_get_drvdata(dev); |
280 | int control; | 280 | int control; |
281 | int ret; | 281 | int ret; |
282 | u8 buf[4]; | ||
283 | 282 | ||
284 | mutex_lock(&ds3232->mutex); | 283 | mutex_lock(&ds3232->mutex); |
285 | 284 | ||
286 | ret = regmap_bulk_read(ds3232->regmap, DS3232_REG_ALARM1, buf, 4); | ||
287 | if (ret) | ||
288 | goto unlock; | ||
289 | |||
290 | buf[0] = bcd2bin(buf[0]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? | ||
291 | 0x80 : buf[0]; | ||
292 | buf[1] = bcd2bin(buf[1]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? | ||
293 | 0x80 : buf[1]; | ||
294 | buf[2] = bcd2bin(buf[2]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? | ||
295 | 0x80 : buf[2]; | ||
296 | buf[3] = bcd2bin(buf[3]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? | ||
297 | 0x80 : buf[3]; | ||
298 | |||
299 | ret = regmap_bulk_write(ds3232->regmap, DS3232_REG_ALARM1, buf, 4); | ||
300 | if (ret) | ||
301 | goto unlock; | ||
302 | |||
303 | ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control); | 285 | ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control); |
304 | if (ret) | 286 | if (ret) |
305 | goto unlock; | 287 | goto unlock; |
306 | 288 | ||
307 | if (enabled || (ds3232->rtc->irq_data & RTC_UF)) | 289 | if (enabled) |
308 | /* enable alarm1 interrupt */ | 290 | /* enable alarm1 interrupt */ |
309 | control |= DS3232_REG_CR_A1IE; | 291 | control |= DS3232_REG_CR_A1IE; |
310 | else | 292 | else |