[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110305005638.866486409@clark.kroah.org>
Date: Fri, 04 Mar 2011 16:55:49 -0800
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Varun Wadekar <vwadekar@...dia.com>,
Samuel Ortiz <sameo@...ux.intel.com>
Subject: [44/73] mfd: Avoid tps6586x burst writes
2.6.37-stable review patch. If anyone has any objections, please let us know.
------------------
From: vwadekar@...dia.com <vwadekar@...dia.com>
commit 4b57018dcd6418e18c08088c89f123da8a7bfc45 upstream.
tps6586 does not support burst writes. i2c writes have to be
1 byte at a time.
Signed-off-by: Varun Wadekar <vwadekar@...dia.com>
Signed-off-by: Samuel Ortiz <sameo@...ux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/mfd/tps6586x.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -152,12 +152,12 @@ static inline int __tps6586x_write(struc
static inline int __tps6586x_writes(struct i2c_client *client, int reg,
int len, uint8_t *val)
{
- int ret;
+ int ret, i;
- ret = i2c_smbus_write_i2c_block_data(client, reg, len, val);
- if (ret < 0) {
- dev_err(&client->dev, "failed writings to 0x%02x\n", reg);
- return ret;
+ for (i = 0; i < len; i++) {
+ ret = __tps6586x_write(client, reg + i, *(val + i));
+ if (ret < 0)
+ return ret;
}
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists