SCSI: remove fake "address-of" expression
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 5 Aug 2010 17:17:10 +0000 (13:17 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Aug 2010 16:17:02 +0000 (09:17 -0700)
Fake "address-of" expressions that evaluate to NULL generally confuse
readers and can provoke compiler warnings.  This patch (as1411) removes
one such fake expression, using an "#ifdef" in its place.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_sysfs.c

index 026295e2c53959adcb6fb1abbbb047b9dc75095a..b4056d14f812d7ecc4e8affc0c234bf6e4837424 100644 (file)
@@ -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;
 /* 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 *);
 #endif
 #ifdef CONFIG_PM_RUNTIME
 extern void scsi_autopm_get_target(struct scsi_target *);
index 562fb3bce2611b2366603c723a2ae7192d0ad9f4..c3f67373a4f8f2193505603e24b019dca1d051d9 100644 (file)
@@ -381,7 +381,9 @@ struct bus_type scsi_bus_type = {
         .name          = "scsi",
         .match         = scsi_bus_match,
        .uevent         = scsi_bus_uevent,
         .name          = "scsi",
         .match         = scsi_bus_match,
        .uevent         = scsi_bus_uevent,
+#ifdef CONFIG_PM_OPS
        .pm             = &scsi_bus_pm_ops,
        .pm             = &scsi_bus_pm_ops,
+#endif
 };
 EXPORT_SYMBOL_GPL(scsi_bus_type);
 
 };
 EXPORT_SYMBOL_GPL(scsi_bus_type);