aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl6040-core.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2012-05-16 14:11:56 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2012-05-20 17:27:12 +0200
commit6712419d697851c4472cdfd2111c844d777472e8 (patch)
treeb2725bdab830ceb9cd2712357e4a36aace81dd45 /drivers/mfd/twl6040-core.c
parentmfd: twl6040 code cleanup in interrupt initialization part (diff)
downloadlinux-dev-6712419d697851c4472cdfd2111c844d777472e8.tar.xz
linux-dev-6712419d697851c4472cdfd2111c844d777472e8.zip
mfd: Allocate twl6040 IRQ numbers dynamically
Use irq_alloc_descs() to get the IRQ number range dynamically instead of the hardwired use if pdata->irq_base. The twl6040 only provides interrupts for it's internal components which means that it is not working as an IRQ expander type of device. The client drivers will receive their interrupt numbers as resource which is configured based on the received IRQ range we got from irq_alloc_descs() Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl6040-core.c')
-rw-r--r--drivers/mfd/twl6040-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c
index 7a92d95bfb60..c50fba7be778 100644
--- a/drivers/mfd/twl6040-core.c
+++ b/drivers/mfd/twl6040-core.c
@@ -515,7 +515,7 @@ static int __devinit twl6040_probe(struct i2c_client *client,
}
/* In order to operate correctly we need valid interrupt config */
- if (!client->irq || !pdata->irq_base) {
+ if (!client->irq) {
dev_err(&client->dev, "Invalid IRQ configuration\n");
return -EINVAL;
}
@@ -552,7 +552,6 @@ static int __devinit twl6040_probe(struct i2c_client *client,
twl6040->dev = &client->dev;
twl6040->irq = client->irq;
- twl6040->irq_base = pdata->irq_base;
mutex_init(&twl6040->mutex);
mutex_init(&twl6040->io_mutex);