From: Jingoo Han Date: Thu, 27 Jun 2013 23:53:28 +0000 (+1000) Subject: rtc: rtc-coh901331: use platform_{get,set}_drvdata() X-Git-Tag: next-20130628~3^2~186 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6427ad674d15ff1882db4f98731ae62dbdfb0f54;p=karo-tx-linux.git rtc: rtc-coh901331: use platform_{get,set}_drvdata() 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 Signed-off-by: Andrew Morton --- diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index c05b2021d25b..73f157519dff 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c @@ -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);