提交 bffcbc08 编写于 作者: J Josh Cartwright 提交者: Linus Torvalds

rtc: pm8xxx: use devm_request_any_context_irq

Make use of the devm_* variant of request_any_context_irq to allow for
elimination of remove().
Signed-off-by: NJosh Cartwright <joshc@codeaurora.org>
Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5d7dc4cf
...@@ -434,9 +434,10 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) ...@@ -434,9 +434,10 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
} }
/* Request the alarm IRQ */ /* Request the alarm IRQ */
rc = request_any_context_irq(rtc_dd->rtc_alarm_irq, rc = devm_request_any_context_irq(&pdev->dev, rtc_dd->rtc_alarm_irq,
pm8xxx_alarm_trigger, IRQF_TRIGGER_RISING, pm8xxx_alarm_trigger,
"pm8xxx_rtc_alarm", rtc_dd); IRQF_TRIGGER_RISING,
"pm8xxx_rtc_alarm", rtc_dd);
if (rc < 0) { if (rc < 0) {
dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc); dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc);
return rc; return rc;
...@@ -449,16 +450,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) ...@@ -449,16 +450,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int pm8xxx_rtc_remove(struct platform_device *pdev)
{
struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
device_init_wakeup(&pdev->dev, 0);
free_irq(rtc_dd->rtc_alarm_irq, rtc_dd);
return 0;
}
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int pm8xxx_rtc_resume(struct device *dev) static int pm8xxx_rtc_resume(struct device *dev)
{ {
...@@ -487,7 +478,6 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops, ...@@ -487,7 +478,6 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops,
static struct platform_driver pm8xxx_rtc_driver = { static struct platform_driver pm8xxx_rtc_driver = {
.probe = pm8xxx_rtc_probe, .probe = pm8xxx_rtc_probe,
.remove = pm8xxx_rtc_remove,
.driver = { .driver = {
.name = PM8XXX_RTC_DEV_NAME, .name = PM8XXX_RTC_DEV_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册