diff options
Diffstat (limited to 'drivers/rtc/rtc-88pm80x.c')
-rw-r--r-- | drivers/rtc/rtc-88pm80x.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index 63b17ebe90e8..f3742f364eb8 100644 --- a/drivers/rtc/rtc-88pm80x.c +++ b/drivers/rtc/rtc-88pm80x.c | |||
@@ -234,7 +234,7 @@ static const struct rtc_class_ops pm80x_rtc_ops = { | |||
234 | .alarm_irq_enable = pm80x_rtc_alarm_irq_enable, | 234 | .alarm_irq_enable = pm80x_rtc_alarm_irq_enable, |
235 | }; | 235 | }; |
236 | 236 | ||
237 | #ifdef CONFIG_PM | 237 | #ifdef CONFIG_PM_SLEEP |
238 | static int pm80x_rtc_suspend(struct device *dev) | 238 | static int pm80x_rtc_suspend(struct device *dev) |
239 | { | 239 | { |
240 | return pm80x_dev_suspend(dev); | 240 | return pm80x_dev_suspend(dev); |
@@ -312,7 +312,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev) | |||
312 | } | 312 | } |
313 | rtc_tm_to_time(&tm, &ticks); | 313 | rtc_tm_to_time(&tm, &ticks); |
314 | 314 | ||
315 | info->rtc_dev = rtc_device_register("88pm80x-rtc", &pdev->dev, | 315 | info->rtc_dev = devm_rtc_device_register(&pdev->dev, "88pm80x-rtc", |
316 | &pm80x_rtc_ops, THIS_MODULE); | 316 | &pm80x_rtc_ops, THIS_MODULE); |
317 | if (IS_ERR(info->rtc_dev)) { | 317 | if (IS_ERR(info->rtc_dev)) { |
318 | ret = PTR_ERR(info->rtc_dev); | 318 | ret = PTR_ERR(info->rtc_dev); |
@@ -346,7 +346,6 @@ static int pm80x_rtc_remove(struct platform_device *pdev) | |||
346 | { | 346 | { |
347 | struct pm80x_rtc_info *info = platform_get_drvdata(pdev); | 347 | struct pm80x_rtc_info *info = platform_get_drvdata(pdev); |
348 | platform_set_drvdata(pdev, NULL); | 348 | platform_set_drvdata(pdev, NULL); |
349 | rtc_device_unregister(info->rtc_dev); | ||
350 | pm80x_free_irq(info->chip, info->irq, info); | 349 | pm80x_free_irq(info->chip, info->irq, info); |
351 | return 0; | 350 | return 0; |
352 | } | 351 | } |