Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365820
b: refs/heads/master
c: fa11f7e
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent e24bfe8 commit 3c4de56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 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: e035be6a551ea4a241784a0f3c53a7f2f2425ec4
refs/heads/master: fa11f7e777077210fad0a962699f874d83fc9bfd
18 changes: 6 additions & 12 deletions trunk/drivers/rtc/rtc-ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,20 +422,19 @@ static int ab8500_rtc_probe(struct platform_device *pdev)

device_init_wakeup(&pdev->dev, true);

rtc = rtc_device_register("ab8500-rtc", &pdev->dev, &ab8500_rtc_ops,
THIS_MODULE);
rtc = devm_rtc_device_register(&pdev->dev, "ab8500-rtc",
&ab8500_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) {
dev_err(&pdev->dev, "Registration failed\n");
err = PTR_ERR(rtc);
return err;
}

err = request_threaded_irq(irq, NULL, rtc_alarm_handler,
IRQF_NO_SUSPEND | IRQF_ONESHOT, "ab8500-rtc", rtc);
if (err < 0) {
rtc_device_unregister(rtc);
err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
rtc_alarm_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
"ab8500-rtc", rtc);
if (err < 0)
return err;
}

platform_set_drvdata(pdev, rtc);

Expand All @@ -450,13 +449,8 @@ static int ab8500_rtc_probe(struct platform_device *pdev)

static int ab8500_rtc_remove(struct platform_device *pdev)
{
struct rtc_device *rtc = platform_get_drvdata(pdev);
int irq = platform_get_irq_byname(pdev, "ALARM");

ab8500_sysfs_rtc_unregister(&pdev->dev);

free_irq(irq, rtc);
rtc_device_unregister(rtc);
platform_set_drvdata(pdev, NULL);

return 0;
Expand Down

0 comments on commit 3c4de56

Please sign in to comment.