aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/ds1337.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/ds1337.c')
-rw-r--r--drivers/i2c/chips/ds1337.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c
index 07f16c3fb084..e2a6aabdc780 100644
--- a/drivers/i2c/chips/ds1337.c
+++ b/drivers/i2c/chips/ds1337.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2005 James Chapman <jchapman@katalix.com> 4 * Copyright (C) 2005 James Chapman <jchapman@katalix.com>
5 * 5 *
6 * based on linux/drivers/acron/char/pcf8583.c 6 * based on linux/drivers/acorn/char/pcf8583.c
7 * Copyright (C) 2000 Russell King 7 * Copyright (C) 2000 Russell King
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
@@ -119,8 +119,7 @@ static int ds1337_get_datetime(struct i2c_client *client, struct rtc_time *dt)
119 msg[1].len = sizeof(buf); 119 msg[1].len = sizeof(buf);
120 msg[1].buf = &buf[0]; 120 msg[1].buf = &buf[0];
121 121
122 result = client->adapter->algo->master_xfer(client->adapter, 122 result = i2c_transfer(client->adapter, msg, 2);
123 &msg[0], 2);
124 123
125 dev_dbg(&client->adapter->dev, 124 dev_dbg(&client->adapter->dev,
126 "%s: [%d] %02x %02x %02x %02x %02x %02x %02x\n", 125 "%s: [%d] %02x %02x %02x %02x %02x %02x %02x\n",
@@ -194,8 +193,7 @@ static int ds1337_set_datetime(struct i2c_client *client, struct rtc_time *dt)
194 msg[0].len = sizeof(buf); 193 msg[0].len = sizeof(buf);
195 msg[0].buf = &buf[0]; 194 msg[0].buf = &buf[0];
196 195
197 result = client->adapter->algo->master_xfer(client->adapter, 196 result = i2c_transfer(client->adapter, msg, 1);
198 &msg[0], 1);
199 if (result < 0) { 197 if (result < 0) {
200 dev_err(&client->adapter->dev, "ds1337[%d]: error " 198 dev_err(&client->adapter->dev, "ds1337[%d]: error "
201 "writing data! %d\n", data->id, result); 199 "writing data! %d\n", data->id, result);