summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-08-23 12:52:35 +0530
committerVarun Colbert <vcolbert@nvidia.com>2012-08-23 16:44:07 -0700
commitf618f5ee7cd5c82dd2884b62eb2dcfab2b00c2e0 (patch)
tree1fb9944ac730bf97e50274d6d6cfdd894e36e096 /drivers/power
parenta90b7567280d6e14ad3965d7e5473da9dfb86eec (diff)
power: tps65090-charger: fix compilation error
The driver is missing the include of interrupt header file. Including it to fix compilation error. Also it is not suggested to use the devm_request_threaded_irq() as it is not safe when removing driver. converting it to non-devm version of API. Change-Id: I5dc3acf731d62861be0fc0f396b97997e7d269ea Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/126823 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/tps65090-charger.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/power/tps65090-charger.c b/drivers/power/tps65090-charger.c
index cdffd26c8d70..efdf2dadd471 100644
--- a/drivers/power/tps65090-charger.c
+++ b/drivers/power/tps65090-charger.c
@@ -21,6 +21,7 @@
*/
#include <linux/err.h>
#include <linux/init.h>
+#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
@@ -192,8 +193,8 @@ static __devinit int tps65090_charger_probe(struct platform_device *pdev)
return -ENODEV;
}
- ret = devm_request_threaded_irq(&pdev->dev, charger_data->irq_base,
- NULL, tps65090_charger_isr, 0, "tps65090",
+ ret = request_threaded_irq(charger_data->irq_base,
+ NULL, tps65090_charger_isr, 0, "tps65090-charger",
charger_data);
if (ret) {
dev_err(charger_data->dev, "Unable to register irq %d err %d\n",
@@ -210,16 +211,19 @@ static __devinit int tps65090_charger_probe(struct platform_device *pdev)
ret = power_supply_register(&pdev->dev, &charger_data->ac);
if (ret) {
dev_err(&pdev->dev, "failed: power supply register\n");
- return ret;
+ goto fail_suppy_reg;
}
ret = tps65090_config_charger(charger_data);
if (ret < 0)
- goto error;
+ goto fail_config;
return 0;
-error:
+fail_config:
power_supply_unregister(&charger_data->ac);
+
+fail_suppy_reg:
+ free_irq(charger_data->irq_base, charger_data);
return ret;
}
@@ -228,6 +232,7 @@ static int tps65090_charger_remove(struct platform_device *pdev)
struct tps65090_charger *charger = dev_get_drvdata(&pdev->dev);
power_supply_unregister(&charger->ac);
+ free_irq(charger->irq_base, charger);
return 0;
}