diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-04-19 16:08:42 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-04-19 16:09:11 -0700 |
commit | 84c606de0617ba304bca456f0ad06729198a5333 (patch) | |
tree | d6f615065646e72ae0914260388db121297b3c02 /drivers/mfd/twl-core.c | |
parent | a6d21d824242244ec6c02c18a517bf021f1e70cd (diff) | |
parent | 0527fde0639955203ad48a9fd83bd6fc35e82e07 (diff) | |
download | kernel_samsung_tuna-84c606de0617ba304bca456f0ad06729198a5333.zip kernel_samsung_tuna-84c606de0617ba304bca456f0ad06729198a5333.tar.gz kernel_samsung_tuna-84c606de0617ba304bca456f0ad06729198a5333.tar.bz2 |
Merge linux-stable 3.0.28 into linux-omap-3.0
Change-Id: I76904a60370e2cb9cc29ccde5d526d9183ff4f8e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r-- | drivers/mfd/twl-core.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index a6f2b8e..953189c 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -365,13 +365,13 @@ int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes) pr_err("%s: invalid module number %d\n", DRIVER_NAME, mod_no); return -EPERM; } - sid = twl_map[mod_no].sid; - twl = &twl_modules[sid]; - if (unlikely(!inuse)) { - pr_err("%s: client %d is not initialized\n", DRIVER_NAME, sid); + pr_err("%s: not initialized\n", DRIVER_NAME); return -EPERM; } + sid = twl_map[mod_no].sid; + twl = &twl_modules[sid]; + mutex_lock(&twl->xfer_lock); /* * [MSG1]: fill the register address data @@ -423,13 +423,13 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes) pr_err("%s: invalid module number %d\n", DRIVER_NAME, mod_no); return -EPERM; } - sid = twl_map[mod_no].sid; - twl = &twl_modules[sid]; - if (unlikely(!inuse)) { - pr_err("%s: client %d is not initialized\n", DRIVER_NAME, sid); + pr_err("%s: not initialized\n", DRIVER_NAME); return -EPERM; } + sid = twl_map[mod_no].sid; + twl = &twl_modules[sid]; + mutex_lock(&twl->xfer_lock); /* [MSG1] fill the register address data */ msg = &twl->xfer_msg[0]; |