From: Jingoo Han <jg1.han@samsung.com>
To: "'Andrew Morton'" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
"'Alessandro Zummo'" <a.zummo@towertech.it>,
rtc-linux@googlegroups.com, "'Jingoo Han'" <jg1.han@samsung.com>
Subject: [PATCH 08/15] rtc: rtc-ep93xx: use dev_get_platdata()
Date: Mon, 23 Sep 2013 18:46:34 +0900 [thread overview]
Message-ID: <002401ceb841$ca341900$5e9c4b00$%han@samsung.com> (raw)
In-Reply-To: <001801ceb840$9a81ab10$cf850130$%han@samsung.com>
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>
---
drivers/rtc/rtc-ep93xx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 580e7b5..5e4f5dc 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -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);
@@ -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);
@@ -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;
--
1.7.10.4
next prev parent reply other threads:[~2013-09-23 9:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 9:38 [PATCH 00/15] rtc: " Jingoo Han
2013-09-23 9:39 ` [PATCH 01/15] rtc: rtc-88pm80x: " Jingoo Han
2013-09-23 9:40 ` [PATCH 02/15] rtc: rtc-88pm860x: " Jingoo Han
2013-10-10 3:41 ` Haojian Zhuang
2013-09-23 9:41 ` [PATCH 03/15] rtc: rtc-cmos: " Jingoo Han
2013-09-23 9:43 ` [PATCH 04/15] rtc: rtc-da9055: " Jingoo Han
2013-09-23 9:43 ` [PATCH 05/15] rtc: rtc-ds1305: " Jingoo Han
2013-09-23 9:44 ` [PATCH 06/15] rtc: rtc-ds1307: " Jingoo Han
2013-09-23 9:45 ` [PATCH 07/15] rtc: rtc-ds2404: " Jingoo Han
2013-09-23 9:46 ` Jingoo Han [this message]
2013-09-23 9:47 ` [PATCH 09/15] rtc: hid-sensor-time: " Jingoo Han
2013-09-23 9:48 ` [PATCH 10/15] rtc: rtc-m48t59: " Jingoo Han
2013-09-23 9:48 ` [PATCH 11/15] rtc: rtc-m48t86: " Jingoo Han
2013-09-23 9:49 ` [PATCH 12/15] rtc: rtc-pcf2123: " Jingoo Han
2013-09-23 9:50 ` [PATCH 13/15] rtc: rtc-rs5c348: " Jingoo Han
2013-09-23 9:52 ` [PATCH 14/15] rtc: rtc-sh: " Jingoo Han
2013-09-23 9:53 ` [PATCH 15/15] rtc: rtc-v3020: " Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002401ceb841$ca341900$5e9c4b00$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome