File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,8 +213,6 @@ static int scsi_bus_restore(struct device *dev)
213213
214214#endif /* CONFIG_PM_SLEEP */
215215
216- #ifdef CONFIG_PM_RUNTIME
217-
218216static int sdev_runtime_suspend (struct device * dev )
219217{
220218 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)
332330 pm_runtime_put_sync (& shost -> shost_gendev );
333331}
334332
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-
343333const struct dev_pm_ops scsi_bus_pm_ops = {
344334 .prepare = scsi_bus_prepare ,
345335 .suspend = scsi_bus_suspend ,
Original file line number Diff line number Diff line change @@ -155,8 +155,7 @@ static inline void scsi_netlink_exit(void) {}
155155/* scsi_pm.c */
156156#ifdef CONFIG_PM
157157extern const struct dev_pm_ops scsi_bus_pm_ops ;
158- #endif
159- #ifdef CONFIG_PM_RUNTIME
158+
160159extern void scsi_autopm_get_target (struct scsi_target * );
161160extern void scsi_autopm_put_target (struct scsi_target * );
162161extern int scsi_autopm_get_host (struct Scsi_Host * );
@@ -166,7 +165,7 @@ static inline void scsi_autopm_get_target(struct scsi_target *t) {}
166165static inline void scsi_autopm_put_target (struct scsi_target * t ) {}
167166static inline int scsi_autopm_get_host (struct Scsi_Host * h ) { return 0 ; }
168167static inline void scsi_autopm_put_host (struct Scsi_Host * h ) {}
169- #endif /* CONFIG_PM_RUNTIME */
168+ #endif /* CONFIG_PM */
170169
171170extern struct async_domain scsi_sd_pm_domain ;
172171extern struct async_domain scsi_sd_probe_domain ;
Original file line number Diff line number Diff line change @@ -62,12 +62,7 @@ static int ufshcd_pci_resume(struct device *dev)
6262{
6363 return ufshcd_system_resume (dev_get_drvdata (dev ));
6464}
65- #else
66- #define ufshcd_pci_suspend NULL
67- #define ufshcd_pci_resume NULL
68- #endif /* CONFIG_PM */
6965
70- #ifdef CONFIG_PM_RUNTIME
7166static int ufshcd_pci_runtime_suspend (struct device * dev )
7267{
7368 return ufshcd_runtime_suspend (dev_get_drvdata (dev ));
@@ -80,11 +75,13 @@ static int ufshcd_pci_runtime_idle(struct device *dev)
8075{
8176 return ufshcd_runtime_idle (dev_get_drvdata (dev ));
8277}
83- #else /* !CONFIG_PM_RUNTIME */
78+ #else /* !CONFIG_PM */
79+ #define ufshcd_pci_suspend NULL
80+ #define ufshcd_pci_resume NULL
8481#define ufshcd_pci_runtime_suspend NULL
8582#define ufshcd_pci_runtime_resume NULL
8683#define ufshcd_pci_runtime_idle NULL
87- #endif /* CONFIG_PM_RUNTIME */
84+ #endif /* CONFIG_PM */
8885
8986/**
9087 * ufshcd_pci_shutdown - main function to put the controller in reset state
Original file line number Diff line number Diff line change @@ -261,12 +261,7 @@ static int ufshcd_pltfrm_resume(struct device *dev)
261261{
262262 return ufshcd_system_resume (dev_get_drvdata (dev ));
263263}
264- #else
265- #define ufshcd_pltfrm_suspend NULL
266- #define ufshcd_pltfrm_resume NULL
267- #endif
268264
269- #ifdef CONFIG_PM_RUNTIME
270265static int ufshcd_pltfrm_runtime_suspend (struct device * dev )
271266{
272267 return ufshcd_runtime_suspend (dev_get_drvdata (dev ));
@@ -279,11 +274,13 @@ static int ufshcd_pltfrm_runtime_idle(struct device *dev)
279274{
280275 return ufshcd_runtime_idle (dev_get_drvdata (dev ));
281276}
282- #else /* !CONFIG_PM_RUNTIME */
277+ #else /* !CONFIG_PM */
278+ #define ufshcd_pltfrm_suspend NULL
279+ #define ufshcd_pltfrm_resume NULL
283280#define ufshcd_pltfrm_runtime_suspend NULL
284281#define ufshcd_pltfrm_runtime_resume NULL
285282#define ufshcd_pltfrm_runtime_idle NULL
286- #endif /* CONFIG_PM_RUNTIME */
283+ #endif /* CONFIG_PM */
287284
288285static void ufshcd_pltfrm_shutdown (struct platform_device * pdev )
289286{
Original file line number Diff line number Diff line change @@ -441,13 +441,13 @@ static inline int scsi_execute_req(struct scsi_device *sdev,
441441extern void sdev_disable_disk_events (struct scsi_device * sdev );
442442extern void sdev_enable_disk_events (struct scsi_device * sdev );
443443
444- #ifdef CONFIG_PM_RUNTIME
444+ #ifdef CONFIG_PM
445445extern int scsi_autopm_get_device (struct scsi_device * );
446446extern void scsi_autopm_put_device (struct scsi_device * );
447447#else
448448static inline int scsi_autopm_get_device (struct scsi_device * d ) { return 0 ; }
449449static inline void scsi_autopm_put_device (struct scsi_device * d ) {}
450- #endif /* CONFIG_PM_RUNTIME */
450+ #endif /* CONFIG_PM */
451451
452452static inline int __must_check scsi_device_reprobe (struct scsi_device * sdev )
453453{
You can’t perform that action at this time.
0 commit comments