瀏覽代碼

[SCSI] remove fake "address-of" expression

Fake "address-of" expressions that evaluate to NULL generally confuse
readers and can provoke compiler warnings.  This patch (as1411)
removes one such fake expression introduced by:

commit db5bd1e0b505c54ff492172ce4abc245cf6cd639
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Thu Jun 17 10:36:49 2010 -0400

    [SCSI] convert to the new PM framework
 
using an "#ifdef" in its place.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Alan Stern 15 年之前
父節點
當前提交
26845f585f
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 0 2
      drivers/scsi/scsi_priv.h
  2. 2 0
      drivers/scsi/scsi_sysfs.c

+ 0 - 2
drivers/scsi/scsi_priv.h

@@ -148,8 +148,6 @@ static inline void scsi_netlink_exit(void) {}
 /* scsi_pm.c */
 #ifdef CONFIG_PM_OPS
 extern const struct dev_pm_ops scsi_bus_pm_ops;
-#else /* CONFIG_PM_OPS */
-#define scsi_bus_pm_ops		(*NULL)
 #endif
 #ifdef CONFIG_PM_RUNTIME
 extern void scsi_autopm_get_target(struct scsi_target *);

+ 2 - 0
drivers/scsi/scsi_sysfs.c

@@ -381,7 +381,9 @@ struct bus_type scsi_bus_type = {
         .name		= "scsi",
         .match		= scsi_bus_match,
 	.uevent		= scsi_bus_uevent,
+#ifdef CONFIG_PM_OPS
 	.pm		= &scsi_bus_pm_ops,
+#endif
 };
 EXPORT_SYMBOL_GPL(scsi_bus_type);