diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-14 17:13:55 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-15 09:11:06 -0500 |
commit | 4f7ad5211eb4d331a54f3cc6832883e5e7e95eea (patch) | |
tree | 5aa95aabc7fcaa014f148e489d8840be0a61e7f3 /drivers/scsi | |
parent | 798bc6d8d50ff26a5033be0cb9c63727943b49fe (diff) |
SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.
Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
drivers/scsi/ and in include/scsi/scsi_device.h.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_pm.c | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi_priv.h | 5 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufshcd-pci.c | 11 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufshcd-pltfrm.c | 11 |
4 files changed, 10 insertions, 27 deletions
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index 7454498c4091..9e43ae1d2163 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c | |||
@@ -213,8 +213,6 @@ static int scsi_bus_restore(struct device *dev) | |||
213 | 213 | ||
214 | #endif /* CONFIG_PM_SLEEP */ | 214 | #endif /* CONFIG_PM_SLEEP */ |
215 | 215 | ||
216 | #ifdef CONFIG_PM_RUNTIME | ||
217 | |||
218 | static int sdev_runtime_suspend(struct device *dev) | 216 | static int sdev_runtime_suspend(struct device *dev) |
219 | { | 217 | { |
220 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 218 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
@@ -332,14 +330,6 @@ void scsi_autopm_put_host(struct Scsi_Host *shost) | |||
332 | pm_runtime_put_sync(&shost->shost_gendev); | 330 | pm_runtime_put_sync(&shost->shost_gendev); |
333 | } | 331 | } |
334 | 332 | ||
335 | #else | ||
336 | |||
337 | #define scsi_runtime_suspend NULL | ||
338 | #define scsi_runtime_resume NULL | ||
339 | #define scsi_runtime_idle NULL | ||
340 | |||
341 | #endif /* CONFIG_PM_RUNTIME */ | ||
342 | |||
343 | const struct dev_pm_ops scsi_bus_pm_ops = { | 333 | const struct dev_pm_ops scsi_bus_pm_ops = { |
344 | .prepare = scsi_bus_prepare, | 334 | .prepare = scsi_bus_prepare, |
345 | .suspend = scsi_bus_suspend, | 335 | .suspend = scsi_bus_suspend, |
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 2dc4a83fb84c..e3902fc66278 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h | |||
@@ -155,8 +155,7 @@ static inline void scsi_netlink_exit(void) {} | |||
155 | /* scsi_pm.c */ | 155 | /* scsi_pm.c */ |
156 | #ifdef CONFIG_PM | 156 | #ifdef CONFIG_PM |
157 | extern const struct dev_pm_ops scsi_bus_pm_ops; | 157 | extern const struct dev_pm_ops scsi_bus_pm_ops; |
158 | #endif | 158 | |
159 | #ifdef CONFIG_PM_RUNTIME | ||
160 | extern void scsi_autopm_get_target(struct scsi_target *); | 159 | extern void scsi_autopm_get_target(struct scsi_target *); |
161 | extern void scsi_autopm_put_target(struct scsi_target *); | 160 | extern void scsi_autopm_put_target(struct scsi_target *); |
162 | extern int scsi_autopm_get_host(struct Scsi_Host *); | 161 | extern int scsi_autopm_get_host(struct Scsi_Host *); |
@@ -166,7 +165,7 @@ static inline void scsi_autopm_get_target(struct scsi_target *t) {} | |||
166 | static inline void scsi_autopm_put_target(struct scsi_target *t) {} | 165 | static inline void scsi_autopm_put_target(struct scsi_target *t) {} |
167 | static inline int scsi_autopm_get_host(struct Scsi_Host *h) { return 0; } | 166 | static inline int scsi_autopm_get_host(struct Scsi_Host *h) { return 0; } |
168 | static inline void scsi_autopm_put_host(struct Scsi_Host *h) {} | 167 | static inline void scsi_autopm_put_host(struct Scsi_Host *h) {} |
169 | #endif /* CONFIG_PM_RUNTIME */ | 168 | #endif /* CONFIG_PM */ |
170 | 169 | ||
171 | extern struct async_domain scsi_sd_pm_domain; | 170 | extern struct async_domain scsi_sd_pm_domain; |
172 | extern struct async_domain scsi_sd_probe_domain; | 171 | extern struct async_domain scsi_sd_probe_domain; |
diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index 955ed5587011..d15eaa466c59 100644 --- a/drivers/scsi/ufs/ufshcd-pci.c +++ b/drivers/scsi/ufs/ufshcd-pci.c | |||
@@ -62,12 +62,7 @@ static int ufshcd_pci_resume(struct device *dev) | |||
62 | { | 62 | { |
63 | return ufshcd_system_resume(dev_get_drvdata(dev)); | 63 | return ufshcd_system_resume(dev_get_drvdata(dev)); |
64 | } | 64 | } |
65 | #else | ||
66 | #define ufshcd_pci_suspend NULL | ||
67 | #define ufshcd_pci_resume NULL | ||
68 | #endif /* CONFIG_PM */ | ||
69 | 65 | ||
70 | #ifdef CONFIG_PM_RUNTIME | ||
71 | static int ufshcd_pci_runtime_suspend(struct device *dev) | 66 | static int ufshcd_pci_runtime_suspend(struct device *dev) |
72 | { | 67 | { |
73 | return ufshcd_runtime_suspend(dev_get_drvdata(dev)); | 68 | return ufshcd_runtime_suspend(dev_get_drvdata(dev)); |
@@ -80,11 +75,13 @@ static int ufshcd_pci_runtime_idle(struct device *dev) | |||
80 | { | 75 | { |
81 | return ufshcd_runtime_idle(dev_get_drvdata(dev)); | 76 | return ufshcd_runtime_idle(dev_get_drvdata(dev)); |
82 | } | 77 | } |
83 | #else /* !CONFIG_PM_RUNTIME */ | 78 | #else /* !CONFIG_PM */ |
79 | #define ufshcd_pci_suspend NULL | ||
80 | #define ufshcd_pci_resume NULL | ||
84 | #define ufshcd_pci_runtime_suspend NULL | 81 | #define ufshcd_pci_runtime_suspend NULL |
85 | #define ufshcd_pci_runtime_resume NULL | 82 | #define ufshcd_pci_runtime_resume NULL |
86 | #define ufshcd_pci_runtime_idle NULL | 83 | #define ufshcd_pci_runtime_idle NULL |
87 | #endif /* CONFIG_PM_RUNTIME */ | 84 | #endif /* CONFIG_PM */ |
88 | 85 | ||
89 | /** | 86 | /** |
90 | * ufshcd_pci_shutdown - main function to put the controller in reset state | 87 | * ufshcd_pci_shutdown - main function to put the controller in reset state |
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index 1c3467b82566..76d39b617db7 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.c +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c | |||
@@ -261,12 +261,7 @@ static int ufshcd_pltfrm_resume(struct device *dev) | |||
261 | { | 261 | { |
262 | return ufshcd_system_resume(dev_get_drvdata(dev)); | 262 | return ufshcd_system_resume(dev_get_drvdata(dev)); |
263 | } | 263 | } |
264 | #else | ||
265 | #define ufshcd_pltfrm_suspend NULL | ||
266 | #define ufshcd_pltfrm_resume NULL | ||
267 | #endif | ||
268 | 264 | ||
269 | #ifdef CONFIG_PM_RUNTIME | ||
270 | static int ufshcd_pltfrm_runtime_suspend(struct device *dev) | 265 | static int ufshcd_pltfrm_runtime_suspend(struct device *dev) |
271 | { | 266 | { |
272 | return ufshcd_runtime_suspend(dev_get_drvdata(dev)); | 267 | return ufshcd_runtime_suspend(dev_get_drvdata(dev)); |
@@ -279,11 +274,13 @@ static int ufshcd_pltfrm_runtime_idle(struct device *dev) | |||
279 | { | 274 | { |
280 | return ufshcd_runtime_idle(dev_get_drvdata(dev)); | 275 | return ufshcd_runtime_idle(dev_get_drvdata(dev)); |
281 | } | 276 | } |
282 | #else /* !CONFIG_PM_RUNTIME */ | 277 | #else /* !CONFIG_PM */ |
278 | #define ufshcd_pltfrm_suspend NULL | ||
279 | #define ufshcd_pltfrm_resume NULL | ||
283 | #define ufshcd_pltfrm_runtime_suspend NULL | 280 | #define ufshcd_pltfrm_runtime_suspend NULL |
284 | #define ufshcd_pltfrm_runtime_resume NULL | 281 | #define ufshcd_pltfrm_runtime_resume NULL |
285 | #define ufshcd_pltfrm_runtime_idle NULL | 282 | #define ufshcd_pltfrm_runtime_idle NULL |
286 | #endif /* CONFIG_PM_RUNTIME */ | 283 | #endif /* CONFIG_PM */ |
287 | 284 | ||
288 | static void ufshcd_pltfrm_shutdown(struct platform_device *pdev) | 285 | static void ufshcd_pltfrm_shutdown(struct platform_device *pdev) |
289 | { | 286 | { |