diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-09-23 06:04:19 -0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-10-25 19:06:10 -0400 |
commit | 0ed81393235fbf9d3379b55d2ceece1885ea3fae (patch) | |
tree | 2b98cd9787e29caeadf8b394b23be924ea70d1b9 /drivers/power/tps65090-charger.c | |
parent | ce77399226313a72578b5b0d67e289d3f165b8ba (diff) |
tps65090-charger: Drop devm_free_irq of devm_ allocated irq
The devm_request_irq function allocates irq that is released when a driver
detaches. Thus, there is no reason to explicitly call devm_free_irq in
probe or remove functions.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power/tps65090-charger.c')
-rw-r--r-- | drivers/power/tps65090-charger.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/power/tps65090-charger.c b/drivers/power/tps65090-charger.c index bdd7b9b2546a..14b6e79e1fc0 100644 --- a/drivers/power/tps65090-charger.c +++ b/drivers/power/tps65090-charger.c | |||
@@ -277,13 +277,13 @@ static int tps65090_charger_probe(struct platform_device *pdev) | |||
277 | if (ret) { | 277 | if (ret) { |
278 | dev_err(cdata->dev, "Unable to register irq %d err %d\n", irq, | 278 | dev_err(cdata->dev, "Unable to register irq %d err %d\n", irq, |
279 | ret); | 279 | ret); |
280 | goto fail_free_irq; | 280 | goto fail_unregister_supply; |
281 | } | 281 | } |
282 | 282 | ||
283 | ret = tps65090_config_charger(cdata); | 283 | ret = tps65090_config_charger(cdata); |
284 | if (ret < 0) { | 284 | if (ret < 0) { |
285 | dev_err(&pdev->dev, "charger config failed, err %d\n", ret); | 285 | dev_err(&pdev->dev, "charger config failed, err %d\n", ret); |
286 | goto fail_free_irq; | 286 | goto fail_unregister_supply; |
287 | } | 287 | } |
288 | 288 | ||
289 | /* Check for charger presence */ | 289 | /* Check for charger presence */ |
@@ -292,14 +292,14 @@ static int tps65090_charger_probe(struct platform_device *pdev) | |||
292 | if (ret < 0) { | 292 | if (ret < 0) { |
293 | dev_err(cdata->dev, "%s(): Error in reading reg 0x%x", __func__, | 293 | dev_err(cdata->dev, "%s(): Error in reading reg 0x%x", __func__, |
294 | TPS65090_REG_CG_STATUS1); | 294 | TPS65090_REG_CG_STATUS1); |
295 | goto fail_free_irq; | 295 | goto fail_unregister_supply; |
296 | } | 296 | } |
297 | 297 | ||
298 | if (status1 != 0) { | 298 | if (status1 != 0) { |
299 | ret = tps65090_enable_charging(cdata); | 299 | ret = tps65090_enable_charging(cdata); |
300 | if (ret < 0) { | 300 | if (ret < 0) { |
301 | dev_err(cdata->dev, "error enabling charger\n"); | 301 | dev_err(cdata->dev, "error enabling charger\n"); |
302 | goto fail_free_irq; | 302 | goto fail_unregister_supply; |
303 | } | 303 | } |
304 | cdata->ac_online = 1; | 304 | cdata->ac_online = 1; |
305 | power_supply_changed(&cdata->ac); | 305 | power_supply_changed(&cdata->ac); |
@@ -307,8 +307,6 @@ static int tps65090_charger_probe(struct platform_device *pdev) | |||
307 | 307 | ||
308 | return 0; | 308 | return 0; |
309 | 309 | ||
310 | fail_free_irq: | ||
311 | devm_free_irq(cdata->dev, irq, cdata); | ||
312 | fail_unregister_supply: | 310 | fail_unregister_supply: |
313 | power_supply_unregister(&cdata->ac); | 311 | power_supply_unregister(&cdata->ac); |
314 | 312 | ||
@@ -319,7 +317,6 @@ static int tps65090_charger_remove(struct platform_device *pdev) | |||
319 | { | 317 | { |
320 | struct tps65090_charger *cdata = platform_get_drvdata(pdev); | 318 | struct tps65090_charger *cdata = platform_get_drvdata(pdev); |
321 | 319 | ||
322 | devm_free_irq(cdata->dev, cdata->irq, cdata); | ||
323 | power_supply_unregister(&cdata->ac); | 320 | power_supply_unregister(&cdata->ac); |
324 | 321 | ||
325 | return 0; | 322 | return 0; |