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

rtc: rtc-wm8350: 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>

authored by

Jingoo Han and committed by
Linus Torvalds
7d17158c 0ed50544

+3 -9
+3 -9
drivers/rtc/rtc-wm8350.c
··· 339 339 .alarm_irq_enable = wm8350_rtc_alarm_irq_enable, 340 340 }; 341 341 342 - #ifdef CONFIG_PM 342 + #ifdef CONFIG_PM_SLEEP 343 343 static int wm8350_rtc_suspend(struct device *dev) 344 344 { 345 345 struct platform_device *pdev = to_platform_device(dev); ··· 375 375 376 376 return 0; 377 377 } 378 - 379 - #else 380 - #define wm8350_rtc_suspend NULL 381 - #define wm8350_rtc_resume NULL 382 378 #endif 383 379 384 380 static int wm8350_rtc_probe(struct platform_device *pdev) ··· 465 469 return 0; 466 470 } 467 471 468 - static struct dev_pm_ops wm8350_rtc_pm_ops = { 469 - .suspend = wm8350_rtc_suspend, 470 - .resume = wm8350_rtc_resume, 471 - }; 472 + static SIMPLE_DEV_PM_OPS(wm8350_rtc_pm_ops, wm8350_rtc_suspend, 473 + wm8350_rtc_resume); 472 474 473 475 static struct platform_driver wm8350_rtc_driver = { 474 476 .probe = wm8350_rtc_probe,