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

drivers/rtc/rtc-ep93xx.c: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change to make
the code simpler and enhance the readability.

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
28dc5f80 77bf3822

+3 -3
+3 -3
drivers/rtc/rtc-ep93xx.c
··· 42 42 static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload, 43 43 unsigned short *delete) 44 44 { 45 - struct ep93xx_rtc *ep93xx_rtc = dev->platform_data; 45 + struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); 46 46 unsigned long comp; 47 47 48 48 comp = __raw_readl(ep93xx_rtc->mmio_base + EP93XX_RTC_SWCOMP); ··· 60 60 61 61 static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm) 62 62 { 63 - struct ep93xx_rtc *ep93xx_rtc = dev->platform_data; 63 + struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); 64 64 unsigned long time; 65 65 66 66 time = __raw_readl(ep93xx_rtc->mmio_base + EP93XX_RTC_DATA); ··· 71 71 72 72 static int ep93xx_rtc_set_mmss(struct device *dev, unsigned long secs) 73 73 { 74 - struct ep93xx_rtc *ep93xx_rtc = dev->platform_data; 74 + struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); 75 75 76 76 __raw_writel(secs + 1, ep93xx_rtc->mmio_base + EP93XX_RTC_LOAD); 77 77 return 0;