Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1341154
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] rtc: pcf85063: remove useless century handling |
| Date | 2016-02-24 00:10 +0100 |
| Message-ID | <r5ufD-44a-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
pcf85063_get_datetime() tries to handle a century bit but that bit is not
documented and the final value is never used anywhere else in the kernel.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
drivers/rtc/rtc-pcf85063.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index c5db231f14de..2b3b99b094b5 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -31,13 +31,10 @@
#define PCF85063_REG_MO 0x09
#define PCF85063_REG_YR 0x0A
-#define PCF85063_MO_C 0x80 /* century */
-
static struct i2c_driver pcf85063_driver;
struct pcf85063 {
struct rtc_device *rtc;
- int c_polarity; /* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
int voltage_low; /* indicates if a low_voltage was detected */
};
@@ -103,9 +100,6 @@ static int pcf85063_get_datetime(struct i2c_client *client, struct rtc_time *tm)
tm->tm_year = bcd2bin(regs[6]);
if (tm->tm_year < 70)
tm->tm_year += 100; /* assume we are in 1970...2069 */
- /* detect the polarity heuristically. see note above. */
- pcf85063->c_polarity = (regs[5] & PCF85063_MO_C) ?
- (tm->tm_year >= 100) : (tm->tm_year < 100);
return rtc_valid_tm(tm);
}
--
2.7.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] rtc: pcf85063: remove useless century handling Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-02-24 00:10 +0100 Re: [PATCH] rtc: pcf85063: remove useless century handling Juergen Borleis <jbe@pengutronix.de> - 2016-02-26 12:10 +0100 Re: [PATCH] rtc: pcf85063: remove useless century handling Juergen Borleis <jbe@pengutronix.de> - 2016-03-01 09:30 +0100
csiph-web