From: Jingoo Han Date: Tue, 26 Mar 2013 23:25:24 +0000 (+1100) Subject: rtc: rtc-imxdi: use devm_rtc_device_register() X-Git-Tag: next-20130404~3^2~229 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=21048b286ad9beb423f1a5c7812c7d46b18f7acb;p=karo-tx-linux.git rtc: rtc-imxdi: use devm_rtc_device_register() devm_rtc_device_register() is device managed and makes cleanup paths simpler. Signed-off-by: Jingoo Han Signed-off-by: Andrew Morton --- diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index a5a143ebdd69..d3a8c8e255de 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c @@ -464,7 +464,7 @@ static int __init dryice_rtc_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, imxdi); - imxdi->rtc = rtc_device_register(pdev->name, &pdev->dev, + imxdi->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &dryice_rtc_ops, THIS_MODULE); if (IS_ERR(imxdi->rtc)) { rc = PTR_ERR(imxdi->rtc); @@ -488,8 +488,6 @@ static int __exit dryice_rtc_remove(struct platform_device *pdev) /* mask all interrupts */ __raw_writel(0, imxdi->ioaddr + DIER); - rtc_device_unregister(imxdi->rtc); - clk_disable_unprepare(imxdi->clk); return 0;