aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2014-07-21 09:05:24 -0400
committerLee Jones <lee.jones@linaro.org>2014-07-25 10:31:40 -0400
commit04aa4438c01938df30ffe26f72cef0cbd0a34f6e (patch)
tree0f1d2c580eb000c8dab5098aa69396d26874d3be /drivers/mfd
parent52149ad265be7694f8afa21fb9af8a5fbf01b1a5 (diff)
mfd: twl4030-irq: Fix style warnings relating to pr_warn() and sizeof()
This is part of an effort to clean-up the MFD subsystem. WARNING: Prefer pr_warn(... to pr_warning(... + pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret); WARNING: sizeof buf should be sizeof(buf) + memset(buf, 0xff, sizeof buf); WARNING: sizeof *agent should be sizeof(*agent) + agent = kzalloc(sizeof *agent, GFP_KERNEL); Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/twl4030-irq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 596b1f657e21..b1dabba763cf 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -297,7 +297,7 @@ static irqreturn_t handle_twl4030_pih(int irq, void *devid)
297 ret = twl_i2c_read_u8(TWL_MODULE_PIH, &pih_isr, 297 ret = twl_i2c_read_u8(TWL_MODULE_PIH, &pih_isr,
298 REG_PIH_ISR_P1); 298 REG_PIH_ISR_P1);
299 if (ret) { 299 if (ret) {
300 pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret); 300 pr_warn("twl4030: I2C error %d reading PIH ISR\n", ret);
301 return IRQ_NONE; 301 return IRQ_NONE;
302 } 302 }
303 303
@@ -338,7 +338,7 @@ static int twl4030_init_sih_modules(unsigned line)
338 irq_line = line; 338 irq_line = line;
339 339
340 /* disable all interrupts on our line */ 340 /* disable all interrupts on our line */
341 memset(buf, 0xff, sizeof buf); 341 memset(buf, 0xff, sizeof(buf));
342 sih = sih_modules; 342 sih = sih_modules;
343 for (i = 0; i < nr_sih_modules; i++, sih++) { 343 for (i = 0; i < nr_sih_modules; i++, sih++) {
344 /* skip USB -- it's funky */ 344 /* skip USB -- it's funky */
@@ -646,7 +646,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
646 if (status < 0) 646 if (status < 0)
647 return status; 647 return status;
648 648
649 agent = kzalloc(sizeof *agent, GFP_KERNEL); 649 agent = kzalloc(sizeof(*agent), GFP_KERNEL);
650 if (!agent) 650 if (!agent)
651 return -ENOMEM; 651 return -ENOMEM;
652 652