The call to scsi_device_resume expects a struct scsi_device pointer.
We should use the to_scsi_device macro here.
Sparse is warning about this:
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 *’
Signed-off-by: Emil Goode <[email protected]>
---
drivers/scsi/scsi_pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 9bd2c41..d4201de 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -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);
--
1.7.10