summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-02-13 14:15:22 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-02-13 14:15:22 -0800
commita269c2f5a5ad2b24a19fdd723363daf18394ec85 (patch)
tree5d5e2871bc83a4def56beb86400c68e6ce1dc27f /drivers/mfd/twl-core.c
parented5016d772b84348cb86ab3cdbc533bd4812f2bb (diff)
parent6252547b8a7acced581b649af4ebf6d65f63a34b (diff)
Merge branch 'omap-fixes-urgent' of git://git.linaro.org/people/rmk/linux-arm
This pull request covers the major oopsing issues with OMAP, caused by the lack of the TWL driver. Even when the TWL driver is not built in, we shouldn't oops. * 'omap-fixes-urgent' of git://git.linaro.org/people/rmk/linux-arm: ARM: omap: fix broken twl-core dependencies and ifdefs ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when pmic is not found
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r--drivers/mfd/twl-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index e04e04ddc15..8ce3959c691 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -263,7 +263,9 @@ struct twl_client {
static struct twl_client twl_modules[TWL_NUM_SLAVES];
+#ifdef CONFIG_IRQ_DOMAIN
static struct irq_domain domain;
+#endif
/* mapping the module id to slave id and base address */
struct twl_mapping {
@@ -1226,13 +1228,13 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
pdata->irq_base = status;
pdata->irq_end = pdata->irq_base + nr_irqs;
+#ifdef CONFIG_IRQ_DOMAIN
domain.irq_base = pdata->irq_base;
domain.nr_irq = nr_irqs;
-#ifdef CONFIG_OF_IRQ
domain.of_node = of_node_get(node);
domain.ops = &irq_domain_simple_ops;
-#endif
irq_domain_add(&domain);
+#endif
if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
dev_dbg(&client->dev, "can't talk I2C?\n");