Commit 3a02893f authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0209affa
...@@ -152,7 +152,7 @@ static struct rtc_class_ops coh901331_ops = { ...@@ -152,7 +152,7 @@ static struct rtc_class_ops coh901331_ops = {
static int __exit coh901331_remove(struct platform_device *pdev) 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) if (rtap)
clk_unprepare(rtap->clk); clk_unprepare(rtap->clk);
...@@ -264,7 +264,7 @@ static SIMPLE_DEV_PM_OPS(coh901331_pm_ops, coh901331_suspend, coh901331_resume); ...@@ -264,7 +264,7 @@ static SIMPLE_DEV_PM_OPS(coh901331_pm_ops, coh901331_suspend, coh901331_resume);
static void coh901331_shutdown(struct platform_device *pdev) 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); clk_enable(rtap->clk);
writel(0, rtap->virtbase + COH901331_IRQ_MASK); writel(0, rtap->virtbase + COH901331_IRQ_MASK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment