Skip to content

Commit

Permalink
drivers/rtc/rtc-ep93xx.c: use dev_get_platdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Nov 13, 2013
1 parent 77bf382 commit 28dc5f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/rtc/rtc-ep93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct ep93xx_rtc {
static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload,
unsigned short *delete)
{
struct ep93xx_rtc *ep93xx_rtc = dev->platform_data;
struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev);
unsigned long comp;

comp = __raw_readl(ep93xx_rtc->mmio_base + EP93XX_RTC_SWCOMP);
Expand All @@ -60,7 +60,7 @@ static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload,

static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
struct ep93xx_rtc *ep93xx_rtc = dev->platform_data;
struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev);
unsigned long time;

time = __raw_readl(ep93xx_rtc->mmio_base + EP93XX_RTC_DATA);
Expand All @@ -71,7 +71,7 @@ static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm)

static int ep93xx_rtc_set_mmss(struct device *dev, unsigned long secs)
{
struct ep93xx_rtc *ep93xx_rtc = dev->platform_data;
struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev);

__raw_writel(secs + 1, ep93xx_rtc->mmio_base + EP93XX_RTC_LOAD);
return 0;
Expand Down

0 comments on commit 28dc5f8

Please sign in to comment.