]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-mxc: switch to using SIMPLE_DEV_PM_OPS
authorJingoo Han <jg1.han@samsung.com>
Mon, 29 Apr 2013 23:19:57 +0000 (16:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:32 +0000 (18:28 -0700)
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>
drivers/rtc/rtc-mxc.c

index 13380ca3651cea943066833b747171473fbd96f9..9a3895bc4f4da1dc86d6b5fad6668f6df85bb04d 100644 (file)
@@ -470,7 +470,7 @@ static int mxc_rtc_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int mxc_rtc_suspend(struct device *dev)
 {
        struct rtc_plat_data *pdata = dev_get_drvdata(dev);
@@ -490,19 +490,14 @@ static int mxc_rtc_resume(struct device *dev)
 
        return 0;
 }
-
-static struct dev_pm_ops mxc_rtc_pm_ops = {
-       .suspend        = mxc_rtc_suspend,
-       .resume         = mxc_rtc_resume,
-};
 #endif
 
+static SIMPLE_DEV_PM_OPS(mxc_rtc_pm_ops, mxc_rtc_suspend, mxc_rtc_resume);
+
 static struct platform_driver mxc_rtc_driver = {
        .driver = {
                   .name        = "mxc_rtc",
-#ifdef CONFIG_PM
                   .pm          = &mxc_rtc_pm_ops,
-#endif
                   .owner       = THIS_MODULE,
        },
        .id_table = imx_rtc_devtype,