summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl4030-irq.c
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2012-03-02 11:11:26 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-22 13:05:34 +0100
commitec1a07b3440cc28946a77a974c21570bbef6ffa1 (patch)
treefc238f2f59f991678c67e15ad4d87ff0ed389d88 /drivers/mfd/twl4030-irq.c
parent5a903090e7aa561901b7f052eb744b480d6126d4 (diff)
downloadblackbird-op-linux-ec1a07b3440cc28946a77a974c21570bbef6ffa1.tar.gz
blackbird-op-linux-ec1a07b3440cc28946a77a974c21570bbef6ffa1.zip
mfd: Replace twl-* pr_ macros by the dev_ equivalent and do various cleanups
Since a structure device is available now, use the dev_ macros instead of the pr_ ones. Clean some badly formatted comments. Remove some unused variables. Move some variable to the place they belong. Clean some badly wrapped lines. Align variable definition Add missing braces in if-then-else block. Add blank line for better readability. Move stuff here and there... Conflicts: drivers/mfd/twl-core.c Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl4030-irq.c')
-rw-r--r--drivers/mfd/twl4030-irq.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 3b748b71c0f3..5d656e814358 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -32,7 +32,6 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/slab.h>
-
#include <linux/of.h>
#include <linux/irqdomain.h>
#include <linux/i2c/twl.h>
@@ -639,14 +638,14 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
int status = -EINVAL;
/* only support modules with standard clear-on-read for now */
- for (sih_mod = 0, sih = sih_modules;
- sih_mod < nr_sih_modules;
+ for (sih_mod = 0, sih = sih_modules; sih_mod < nr_sih_modules;
sih_mod++, sih++) {
if (sih->module == module && sih->set_cor) {
status = 0;
break;
}
}
+
if (status < 0)
return status;
@@ -676,7 +675,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
status = request_threaded_irq(irq, NULL, handle_twl4030_sih, 0,
agent->irq_name ?: sih->name, NULL);
- pr_info("twl4030: %s (irq %d) chaining IRQs %d..%d\n", sih->name,
+ dev_info(dev, "%s (irq %d) chaining IRQs %d..%d\n", sih->name,
irq, irq_base, irq_base + i - 1);
return status < 0 ? status : irq_base;
@@ -692,12 +691,10 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
int twl4030_init_irq(struct device *dev, int irq_num)
{
static struct irq_chip twl4030_irq_chip;
+ int status, i;
int irq_base, irq_end, nr_irqs;
struct device_node *node = dev->of_node;
- int status;
- int i;
-
/*
* TWL core and pwr interrupts must be contiguous because
* the hwirqs numbers are defined contiguously from 1 to 15.
@@ -727,7 +724,7 @@ int twl4030_init_irq(struct device *dev, int irq_num)
twl4030_irq_base = irq_base;
/*
- * install an irq handler for each of the SIH modules;
+ * Install an irq handler for each of the SIH modules;
* clone dummy irq_chip since PIH can't *do* anything
*/
twl4030_irq_chip = dummy_irq_chip;
@@ -742,13 +739,13 @@ int twl4030_init_irq(struct device *dev, int irq_num)
activate_irq(i);
}
- pr_info("twl4030: %s (irq %d) chaining IRQs %d..%d\n", "PIH",
+ dev_info(dev, "%s (irq %d) chaining IRQs %d..%d\n", "PIH",
irq_num, irq_base, irq_end);
/* ... and the PWR_INT module ... */
status = twl4030_sih_setup(dev, TWL4030_MODULE_INT, irq_end);
if (status < 0) {
- pr_err("twl4030: sih_setup PWR INT --> %d\n", status);
+ dev_err(dev, "sih_setup PWR INT --> %d\n", status);
goto fail;
}
@@ -757,7 +754,7 @@ int twl4030_init_irq(struct device *dev, int irq_num)
IRQF_ONESHOT,
"TWL4030-PIH", NULL);
if (status < 0) {
- pr_err("twl4030: could not claim irq%d: %d\n", irq_num, status);
+ dev_err(dev, "could not claim irq%d: %d\n", irq_num, status);
goto fail_rqirq;
}
OpenPOWER on IntegriCloud