Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350601
b: refs/heads/master
c: 0853699
h: refs/heads/master
i:
  350599: aaf199b
v: v3
  • Loading branch information
Julia Lawall authored and Anton Vorontsov committed Jan 6, 2013
1 parent 279bede commit bd58d59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8feffd109977c045669913f4e80e8811f2212cd9
refs/heads/master: 0853699252afdeece69c9127d57fd367d3c04a35
13 changes: 4 additions & 9 deletions trunk/drivers/power/88pm860x_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,15 +915,13 @@ static int pm860x_battery_probe(struct platform_device *pdev)
info->irq_cc = platform_get_irq(pdev, 0);
if (info->irq_cc <= 0) {
dev_err(&pdev->dev, "No IRQ resource!\n");
ret = -EINVAL;
goto out;
return -EINVAL;
}

info->irq_batt = platform_get_irq(pdev, 1);
if (info->irq_batt <= 0) {
dev_err(&pdev->dev, "No IRQ resource!\n");
ret = -EINVAL;
goto out;
return -EINVAL;
}

info->chip = chip;
Expand Down Expand Up @@ -957,7 +955,7 @@ static int pm860x_battery_probe(struct platform_device *pdev)

ret = power_supply_register(&pdev->dev, &info->battery);
if (ret)
goto out;
return ret;
info->battery.dev->parent = &pdev->dev;

ret = request_threaded_irq(info->irq_cc, NULL,
Expand All @@ -984,19 +982,16 @@ static int pm860x_battery_probe(struct platform_device *pdev)
free_irq(info->irq_cc, info);
out_reg:
power_supply_unregister(&info->battery);
out:
kfree(info);
return ret;
}

static int pm860x_battery_remove(struct platform_device *pdev)
{
struct pm860x_battery_info *info = platform_get_drvdata(pdev);

power_supply_unregister(&info->battery);
free_irq(info->irq_batt, info);
free_irq(info->irq_cc, info);
kfree(info);
power_supply_unregister(&info->battery);
platform_set_drvdata(pdev, NULL);
return 0;
}
Expand Down

0 comments on commit bd58d59

Please sign in to comment.