diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-04-03 17:50:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:21 -0400 |
commit | b5ada4600dfd4f07f570a6dda7b5b020d96f8591 (patch) | |
tree | 53f3a60eb9c1948f8d63bd818ac2b112ce72ac85 | |
parent | a8a15eb19d885bec172c396178c148264987922f (diff) |
drivers/rtc/rtc-cmos.c: fix compilation warning when !CONFIG_PM_SLEEP
CONFIG_PM will be set also if only CONFIG_PM_RUNTIME is set which causes
the compiler to emit following warning:
drivers/rtc/rtc-cmos.c:845:12: warning: =E2=80=98cmos_resume=E2=80=99 defined but not used [-Wunused-function]
Fix this by using CONFIG_PM_SLEEP instead of CONFIG_PM and removing it
from the driver pm ops as this has been taken care by
SIMPLE_DEV_PM_OPS() already.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.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-cmos.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index cae212f30d65..0963c9309c74 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -837,7 +837,7 @@ static void __exit cmos_do_remove(struct device *dev) | |||
837 | cmos->dev = NULL; | 837 | cmos->dev = NULL; |
838 | } | 838 | } |
839 | 839 | ||
840 | #ifdef CONFIG_PM | 840 | #ifdef CONFIG_PM_SLEEP |
841 | 841 | ||
842 | static int cmos_suspend(struct device *dev) | 842 | static int cmos_suspend(struct device *dev) |
843 | { | 843 | { |
@@ -935,8 +935,6 @@ static int cmos_resume(struct device *dev) | |||
935 | return 0; | 935 | return 0; |
936 | } | 936 | } |
937 | 937 | ||
938 | static SIMPLE_DEV_PM_OPS(cmos_pm_ops, cmos_suspend, cmos_resume); | ||
939 | |||
940 | #else | 938 | #else |
941 | 939 | ||
942 | static inline int cmos_poweroff(struct device *dev) | 940 | static inline int cmos_poweroff(struct device *dev) |
@@ -946,6 +944,8 @@ static inline int cmos_poweroff(struct device *dev) | |||
946 | 944 | ||
947 | #endif | 945 | #endif |
948 | 946 | ||
947 | static SIMPLE_DEV_PM_OPS(cmos_pm_ops, cmos_suspend, cmos_resume); | ||
948 | |||
949 | /*----------------------------------------------------------------*/ | 949 | /*----------------------------------------------------------------*/ |
950 | 950 | ||
951 | /* On non-x86 systems, a "CMOS" RTC lives most naturally on platform_bus. | 951 | /* On non-x86 systems, a "CMOS" RTC lives most naturally on platform_bus. |
@@ -1088,11 +1088,9 @@ static struct pnp_driver cmos_pnp_driver = { | |||
1088 | 1088 | ||
1089 | /* flag ensures resume() gets called, and stops syslog spam */ | 1089 | /* flag ensures resume() gets called, and stops syslog spam */ |
1090 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, | 1090 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, |
1091 | #ifdef CONFIG_PM_SLEEP | ||
1092 | .driver = { | 1091 | .driver = { |
1093 | .pm = &cmos_pm_ops, | 1092 | .pm = &cmos_pm_ops, |
1094 | }, | 1093 | }, |
1095 | #endif | ||
1096 | }; | 1094 | }; |
1097 | 1095 | ||
1098 | #endif /* CONFIG_PNP */ | 1096 | #endif /* CONFIG_PNP */ |