[PATCH] I2C: ds1337 1/4
Use i2c_transfer to send message, so we get proper bus locking.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
commit 3e9d0ba1305cd7c6efd2ab3a003e58a27da1796b
tree bdbcf0d4fca8ed72cb59ae89fa9e513bd2c3da3e
parent 69113efac29e5f1b7a03dd4fdca5ede6901f4eb8
author Ladislav Michl <[email protected]> Fri, 08 Apr 2005 15:00:21 +0200
committer Greg Kroah-Hartman <[email protected]> Tue, 21 Jun 2005 21:51:50 -0700
drivers/i2c/chips/ds1337.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c
--- a/drivers/i2c/chips/ds1337.c
+++ b/drivers/i2c/chips/ds1337.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2005 James Chapman <[email protected]>
*
- * based on linux/drivers/acron/char/pcf8583.c
+ * based on linux/drivers/acorn/char/pcf8583.c
* Copyright (C) 2000 Russell King
*
* This program is free software; you can redistribute it and/or modify
@@ -119,8 +119,7 @@ static int ds1337_get_datetime(struct i2
msg[1].len = sizeof(buf);
msg[1].buf = &buf[0];
- result = client->adapter->algo->master_xfer(client->adapter,
- &msg[0], 2);
+ result = i2c_transfer(client->adapter, msg, 2);
dev_dbg(&client->adapter->dev,
"%s: [%d] %02x %02x %02x %02x %02x %02x %02x\n",
@@ -194,8 +193,7 @@ static int ds1337_set_datetime(struct i2
msg[0].len = sizeof(buf);
msg[0].buf = &buf[0];
- result = client->adapter->algo->master_xfer(client->adapter,
- &msg[0], 1);
+ result = i2c_transfer(client->adapter, msg, 1);
if (result < 0) {
dev_err(&client->adapter->dev, "ds1337[%d]: error "
"writing data! %d\n", data->id, result);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]