]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-coh901331: use platform_{get,set}_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Thu, 27 Jun 2013 23:53:28 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:42 +0000 (16:38 +1000)
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-coh901331.c

index c05b2021d25b4de7c7edac9a822c0fb42c3f302b..73f157519dff08acdf9aa96e4e3d2135ed1721b9 100644 (file)
@@ -152,7 +152,7 @@ static struct rtc_class_ops coh901331_ops = {
 
 static int __exit coh901331_remove(struct platform_device *pdev)
 {
-       struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev);
+       struct coh901331_port *rtap = platform_get_drvdata(pdev);
 
        if (rtap)
                clk_unprepare(rtap->clk);
@@ -264,7 +264,7 @@ static SIMPLE_DEV_PM_OPS(coh901331_pm_ops, coh901331_suspend, coh901331_resume);
 
 static void coh901331_shutdown(struct platform_device *pdev)
 {
-       struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev);
+       struct coh901331_port *rtap = platform_get_drvdata(pdev);
 
        clk_enable(rtap->clk);
        writel(0, rtap->virtbase + COH901331_IRQ_MASK);