summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/tps6586x.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-03-12 09:25:53 +0100
committerGrant Likely <grant.likely@secretlab.ca>2011-03-12 09:25:53 +0100
commit9c3c8afccb6a163fd2be739f511e863eab668702 (patch)
treee587a5377ada98fed8cfa6c8ee63125361f2818a /drivers/mfd/tps6586x.c
parentof_mmc_spi: add card detect irq support (diff)
parentLinux 2.6.38-rc8 (diff)
downloadlinux-9c3c8afccb6a163fd2be739f511e863eab668702.tar.xz
linux-9c3c8afccb6a163fd2be739f511e863eab668702.zip
Merge commit 'v2.6.38-rc8' into spi/next
Conflicts: drivers/spi/pxa2xx_spi_pci.c
Diffstat (limited to 'drivers/mfd/tps6586x.c')
-rw-r--r--drivers/mfd/tps6586x.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 627cf577b16d..e9018d1394ee 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -150,12 +150,12 @@ static inline int __tps6586x_write(struct i2c_client *client,
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;