diff options
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/twl6030-irq.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index 1606cedbbff4..f7da2614de80 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c | |||
@@ -313,7 +313,7 @@ int twl6030_init_irq(struct device *dev, int irq_num) | |||
313 | struct device_node *node = dev->of_node; | 313 | struct device_node *node = dev->of_node; |
314 | int nr_irqs, irq_base, irq_end; | 314 | int nr_irqs, irq_base, irq_end; |
315 | static struct irq_chip twl6030_irq_chip; | 315 | static struct irq_chip twl6030_irq_chip; |
316 | int status = 0; | 316 | int status; |
317 | int i; | 317 | int i; |
318 | u8 mask[3]; | 318 | u8 mask[3]; |
319 | 319 | ||
@@ -335,11 +335,16 @@ int twl6030_init_irq(struct device *dev, int irq_num) | |||
335 | mask[2] = 0xFF; | 335 | mask[2] = 0xFF; |
336 | 336 | ||
337 | /* mask all int lines */ | 337 | /* mask all int lines */ |
338 | twl_i2c_write(TWL_MODULE_PIH, &mask[0], REG_INT_MSK_LINE_A, 3); | 338 | status = twl_i2c_write(TWL_MODULE_PIH, &mask[0], REG_INT_MSK_LINE_A, 3); |
339 | /* mask all int sts */ | 339 | /* mask all int sts */ |
340 | twl_i2c_write(TWL_MODULE_PIH, &mask[0], REG_INT_MSK_STS_A, 3); | 340 | status |= twl_i2c_write(TWL_MODULE_PIH, &mask[0], REG_INT_MSK_STS_A, 3); |
341 | /* clear INT_STS_A,B,C */ | 341 | /* clear INT_STS_A,B,C */ |
342 | twl_i2c_write(TWL_MODULE_PIH, &mask[0], REG_INT_STS_A, 3); | 342 | status |= twl_i2c_write(TWL_MODULE_PIH, &mask[0], REG_INT_STS_A, 3); |
343 | |||
344 | if (status < 0) { | ||
345 | dev_err(dev, "I2C err writing TWL_MODULE_PIH: %d\n", status); | ||
346 | return status; | ||
347 | } | ||
343 | 348 | ||
344 | twl6030_irq_base = irq_base; | 349 | twl6030_irq_base = irq_base; |
345 | 350 | ||