Skip to contentSkip to conversation

scsi_pm: fix passing incompatible pointer for scsi_device_resume()

PATCH New Axel Lin 1 participant 1 message May 19, 2012 SCSI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 scsi_pm: fix passing incompatible pointer for scsi_device_resume()

Fix below build warning:

CC drivers/scsi/scsi_pm.o
drivers/scsi/scsi_pm.c: In function 'scsi_dev_type_suspend':
drivers/scsi/scsi_pm.c:30:5: warning: passing argument 1 of 'scsi_device_resume' from incompatible pointer type [enabled by default] include/scsi/scsi_device.h:368:13: note: expected 'struct scsi_device *' but argument is of type 'struct device *'

---
 drivers/scsi/scsi_pm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/scsi_pm.c +1 -1
index 9bd2c41..d4201de 100644
@@ -27,7 +27,7 @@ static int scsi_dev_type_suspend(struct device *dev, pm_message_t msg)
 		if (drv && drv->suspend) {
 			err = drv->suspend(dev, msg);
 			if (err)
-				scsi_device_resume(dev);
+				scsi_device_resume(to_scsi_device(dev));
 		}
 	}
 	dev_dbg(dev, "scsi suspend: %d\n", err);
Signature · 1 line
1.7.5.4