diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 19:19:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:32 -0400 |
commit | 29756a52e27d57d8435347c871598e9170a88c47 (patch) | |
tree | ef7ca0f3a03d33543a932dca0086d378f3438095 /drivers/rtc/rtc-rc5t583.c | |
parent | c5a40618d93bcd3bd63f27e0b9decee38fab3e73 (diff) |
rtc: rtc-rc5t583: switch to using SIMPLE_DEV_PM_OPS
Switch to using the SIMPLE_DEV_PM_OPS macro to declare the driver's
pm_ops. It reduces code size.
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>
Diffstat (limited to 'drivers/rtc/rtc-rc5t583.c')
-rw-r--r-- | drivers/rtc/rtc-rc5t583.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c index 518908d9d6aa..8eabcf51b35a 100644 --- a/drivers/rtc/rtc-rc5t583.c +++ b/drivers/rtc/rtc-rc5t583.c | |||
@@ -280,7 +280,6 @@ static int rc5t583_rtc_remove(struct platform_device *pdev) | |||
280 | } | 280 | } |
281 | 281 | ||
282 | #ifdef CONFIG_PM_SLEEP | 282 | #ifdef CONFIG_PM_SLEEP |
283 | |||
284 | static int rc5t583_rtc_suspend(struct device *dev) | 283 | static int rc5t583_rtc_suspend(struct device *dev) |
285 | { | 284 | { |
286 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev->parent); | 285 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev->parent); |
@@ -302,24 +301,18 @@ static int rc5t583_rtc_resume(struct device *dev) | |||
302 | return regmap_write(rc5t583->regmap, RC5T583_RTC_CTL1, | 301 | return regmap_write(rc5t583->regmap, RC5T583_RTC_CTL1, |
303 | rc5t583_rtc->irqen); | 302 | rc5t583_rtc->irqen); |
304 | } | 303 | } |
305 | |||
306 | static const struct dev_pm_ops rc5t583_rtc_pm_ops = { | ||
307 | .suspend = rc5t583_rtc_suspend, | ||
308 | .resume = rc5t583_rtc_resume, | ||
309 | }; | ||
310 | |||
311 | #define DEV_PM_OPS (&rc5t583_rtc_pm_ops) | ||
312 | #else | ||
313 | #define DEV_PM_OPS NULL | ||
314 | #endif | 304 | #endif |
315 | 305 | ||
306 | static SIMPLE_DEV_PM_OPS(rc5t583_rtc_pm_ops, rc5t583_rtc_suspend, | ||
307 | rc5t583_rtc_resume); | ||
308 | |||
316 | static struct platform_driver rc5t583_rtc_driver = { | 309 | static struct platform_driver rc5t583_rtc_driver = { |
317 | .probe = rc5t583_rtc_probe, | 310 | .probe = rc5t583_rtc_probe, |
318 | .remove = rc5t583_rtc_remove, | 311 | .remove = rc5t583_rtc_remove, |
319 | .driver = { | 312 | .driver = { |
320 | .owner = THIS_MODULE, | 313 | .owner = THIS_MODULE, |
321 | .name = "rtc-rc5t583", | 314 | .name = "rtc-rc5t583", |
322 | .pm = DEV_PM_OPS, | 315 | .pm = &rc5t583_rtc_pm_ops, |
323 | }, | 316 | }, |
324 | }; | 317 | }; |
325 | 318 | ||