diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-18 15:48:49 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-18 15:48:49 (GMT) |
commit | 73f56c0d35e6427081a4eabd620d8b8d8a35bd09 (patch) | |
tree | 9fe1a2577baea03f3a6ec4a5e79f3ff26c4ee0ae /drivers/mfd | |
parent | 0af40a4b1050c050e62eb1dc30b82d5ab22bf221 (diff) | |
parent | 8501c45cc32c311ae755a2d5ac8c4a5f04908d42 (diff) | |
download | linux-fsl-qoriq-73f56c0d35e6427081a4eabd620d8b8d8a35bd09.tar.xz |
Merge branch 'iommu-fixes-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into x86/urgent
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/da903x.c | 2 | ||||
-rw-r--r-- | drivers/mfd/wm8350-i2c.c | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c index b57326a..0b5bd85 100644 --- a/drivers/mfd/da903x.c +++ b/drivers/mfd/da903x.c @@ -267,7 +267,7 @@ static int da9030_mask_events(struct da903x_chip *chip, unsigned int events) { uint8_t v[3]; - chip->events_mask &= ~events; + chip->events_mask |= events; v[0] = (chip->events_mask & 0xff); v[1] = (chip->events_mask >> 8) & 0xff; diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c index 8dfe21b..3e0ce0e 100644 --- a/drivers/mfd/wm8350-i2c.c +++ b/drivers/mfd/wm8350-i2c.c @@ -30,7 +30,12 @@ static int wm8350_i2c_read_device(struct wm8350 *wm8350, char reg, ret = i2c_master_send(wm8350->i2c_client, ®, 1); if (ret < 0) return ret; - return i2c_master_recv(wm8350->i2c_client, dest, bytes); + ret = i2c_master_recv(wm8350->i2c_client, dest, bytes); + if (ret < 0) + return ret; + if (ret != bytes) + return -EIO; + return 0; } static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg, @@ -38,13 +43,19 @@ static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg, { /* we add 1 byte for device register */ u8 msg[(WM8350_MAX_REGISTER << 1) + 1]; + int ret; if (bytes > ((WM8350_MAX_REGISTER << 1) + 1)) return -EINVAL; msg[0] = reg; memcpy(&msg[1], src, bytes); - return i2c_master_send(wm8350->i2c_client, msg, bytes + 1); + ret = i2c_master_send(wm8350->i2c_client, msg, bytes + 1); + if (ret < 0) + return ret; + if (ret != bytes + 1) + return -EIO; + return 0; } static int wm8350_i2c_probe(struct i2c_client *i2c, |