aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/twl-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-12-21 18:28:52 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-12-21 18:28:52 -0800
commit0703c680f62cb210fecf24684cc1c6a70c26c899 (patch)
tree3ba1f520d41a5bb64c0cd9b62ca456ac378b85ef /drivers/mfd/twl-core.c
parente6f67b8c05f5e129e126f4409ddac6f25f58ffcb (diff)
parentfa860403e61cf5201e2f03b726aa53c30ae9a659 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Include linux/io.h to jz4740-adc mfd: Use request_threaded_irq for twl4030-irq instead of irq_set_chained_handler mfd: Base interrupt for twl4030-irq must be one-shot mfd: Handle tps65910 clear-mask correctly mfd: add #ifdef CONFIG_DEBUG_FS guard for ab8500_debug_resources mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver mfd: include linux/module.h for ab5500-debugfs mfd: Update wm8994 active device checks for WM1811 mfd: Set tps6586x bits if new value is different from the old one mfd: Set da903x bits if new value is different from the old one mfd: Set adp5520 bits if new value is different from the old one mfd: Add missed free_irq in da903x_remove
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r--drivers/mfd/twl-core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index bfbd66021af..61e70cfaa77 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -363,13 +363,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
@@ -420,13 +420,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];