summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAfzal Mohammed <afzal@ti.com>2011-12-14 10:35:35 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 23:37:40 (GMT)
commit1e351a95b6fda20e16b64a698bae505765080308 (patch)
treee44a5981279a36b911a14c7b91d6ee290222c712
parent26cc3ab984cd00e95cb58ba5aaea4238ea56c700 (diff)
downloadlinux-fsl-qoriq-1e351a95b6fda20e16b64a698bae505765080308.tar.xz
mfd: Make TPS65910 usable without interrupts
TPS65910 can be used without interrupts. Hence let probe succeed in case interrupt can't be configured and let Kernel only to complain about it Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/mfd/tps65910-irq.c3
-rw-r--r--drivers/mfd/tps65910.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mfd/tps65910-irq.c b/drivers/mfd/tps65910-irq.c
index a56be93..95c0d79 100644
--- a/drivers/mfd/tps65910-irq.c
+++ b/drivers/mfd/tps65910-irq.c
@@ -215,6 +215,7 @@ int tps65910_irq_init(struct tps65910 *tps65910, int irq,
int tps65910_irq_exit(struct tps65910 *tps65910)
{
- free_irq(tps65910->chip_irq, tps65910);
+ if (tps65910->chip_irq)
+ free_irq(tps65910->chip_irq, tps65910);
return 0;
}
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index c1da84b..01cf501 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -172,15 +172,12 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base);
- ret = tps65910_irq_init(tps65910, init_data->irq, init_data);
- if (ret < 0)
- goto err;
+ tps65910_irq_init(tps65910, init_data->irq, init_data);
kfree(init_data);
return ret;
err:
- mfd_remove_devices(tps65910->dev);
kfree(tps65910);
kfree(init_data);
return ret;
@@ -190,8 +187,8 @@ static int tps65910_i2c_remove(struct i2c_client *i2c)
{
struct tps65910 *tps65910 = i2c_get_clientdata(i2c);
- mfd_remove_devices(tps65910->dev);
tps65910_irq_exit(tps65910);
+ mfd_remove_devices(tps65910->dev);
kfree(tps65910);
return 0;