diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-11-12 18:10:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 22:09:28 -0500 |
commit | b5ebf0780da1846d985998565a51935d10b807da (patch) | |
tree | c7cd3423fde0d37197ca4c26e000ed431913ac68 | |
parent | b7efdf3b1be423d21fa3106aede5a8bcb9c4d152 (diff) |
drivers/rtc/rtc-88pm80x.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>
-rw-r--r-- | drivers/rtc/rtc-88pm80x.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index 354c937a5866..0916089c7c3e 100644 --- a/drivers/rtc/rtc-88pm80x.c +++ b/drivers/rtc/rtc-88pm80x.c | |||
@@ -251,14 +251,15 @@ static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume); | |||
251 | static int pm80x_rtc_probe(struct platform_device *pdev) | 251 | static int pm80x_rtc_probe(struct platform_device *pdev) |
252 | { | 252 | { |
253 | struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); | 253 | struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); |
254 | struct pm80x_platform_data *pm80x_pdata; | 254 | struct pm80x_platform_data *pm80x_pdata = |
255 | dev_get_platdata(pdev->dev.parent); | ||
255 | struct pm80x_rtc_pdata *pdata = NULL; | 256 | struct pm80x_rtc_pdata *pdata = NULL; |
256 | struct pm80x_rtc_info *info; | 257 | struct pm80x_rtc_info *info; |
257 | struct rtc_time tm; | 258 | struct rtc_time tm; |
258 | unsigned long ticks = 0; | 259 | unsigned long ticks = 0; |
259 | int ret; | 260 | int ret; |
260 | 261 | ||
261 | pdata = pdev->dev.platform_data; | 262 | pdata = dev_get_platdata(&pdev->dev); |
262 | if (pdata == NULL) | 263 | if (pdata == NULL) |
263 | dev_warn(&pdev->dev, "No platform data!\n"); | 264 | dev_warn(&pdev->dev, "No platform data!\n"); |
264 | 265 | ||
@@ -326,8 +327,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev) | |||
326 | regmap_update_bits(info->map, PM800_RTC_CONTROL, PM800_RTC1_USE_XO, | 327 | regmap_update_bits(info->map, PM800_RTC_CONTROL, PM800_RTC1_USE_XO, |
327 | PM800_RTC1_USE_XO); | 328 | PM800_RTC1_USE_XO); |
328 | 329 | ||
329 | if (pdev->dev.parent->platform_data) { | 330 | if (pm80x_pdata) { |
330 | pm80x_pdata = pdev->dev.parent->platform_data; | ||
331 | pdata = pm80x_pdata->rtc; | 331 | pdata = pm80x_pdata->rtc; |
332 | if (pdata) | 332 | if (pdata) |
333 | info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup; | 333 | info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup; |