]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-rc5t583: use platform_{get,set}_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Fri, 7 Jun 2013 00:09:17 +0000 (10:09 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:43:03 +0000 (15:43 +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-rc5t583.c

index 8eabcf51b35a05f21f0f43abe9bd563e7f5b5588..e53e9b1c69b3a315df0252dc0bba6665a1ffa6c6 100644 (file)
@@ -273,7 +273,7 @@ static int rc5t583_rtc_probe(struct platform_device *pdev)
  */
 static int rc5t583_rtc_remove(struct platform_device *pdev)
 {
-       struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev);
+       struct rc5t583_rtc *rc5t583_rtc = platform_get_drvdata(pdev);
 
        rc5t583_rtc_alarm_irq_enable(&rc5t583_rtc->rtc->dev, 0);
        return 0;