diff options
Diffstat (limited to 'drivers/i2c/chips/ds1337.c')
-rw-r--r-- | drivers/i2c/chips/ds1337.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c index 01b037007410..02682fb794c8 100644 --- a/drivers/i2c/chips/ds1337.c +++ b/drivers/i2c/chips/ds1337.c | |||
@@ -164,9 +164,9 @@ static int ds1337_set_datetime(struct i2c_client *client, struct rtc_time *dt) | |||
164 | buf[1] = BIN2BCD(dt->tm_sec); | 164 | buf[1] = BIN2BCD(dt->tm_sec); |
165 | buf[2] = BIN2BCD(dt->tm_min); | 165 | buf[2] = BIN2BCD(dt->tm_min); |
166 | buf[3] = BIN2BCD(dt->tm_hour); | 166 | buf[3] = BIN2BCD(dt->tm_hour); |
167 | buf[4] = BIN2BCD(dt->tm_wday) + 1; | 167 | buf[4] = BIN2BCD(dt->tm_wday + 1); |
168 | buf[5] = BIN2BCD(dt->tm_mday); | 168 | buf[5] = BIN2BCD(dt->tm_mday); |
169 | buf[6] = BIN2BCD(dt->tm_mon) + 1; | 169 | buf[6] = BIN2BCD(dt->tm_mon + 1); |
170 | val = dt->tm_year; | 170 | val = dt->tm_year; |
171 | if (val >= 100) { | 171 | if (val >= 100) { |
172 | val -= 100; | 172 | val -= 100; |