Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jingoo Han and committed by
Linus Torvalds
3a02893f 0209affa

+2 -2
+2 -2
drivers/rtc/rtc-coh901331.c
··· 152 152 153 153 static int __exit coh901331_remove(struct platform_device *pdev) 154 154 { 155 - struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev); 155 + struct coh901331_port *rtap = platform_get_drvdata(pdev); 156 156 157 157 if (rtap) 158 158 clk_unprepare(rtap->clk); ··· 264 264 265 265 static void coh901331_shutdown(struct platform_device *pdev) 266 266 { 267 - struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev); 267 + struct coh901331_port *rtap = platform_get_drvdata(pdev); 268 268 269 269 clk_enable(rtap->clk); 270 270 writel(0, rtap->virtbase + COH901331_IRQ_MASK);