summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-03-21 16:05:16 +0900
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-22 10:41:12 -0500
commit1dfcda06a67d6ad6f890dbd1bab84be5f17ef46d (patch)
treec327bdbb97f70f609fb9f3a19f263a493cee5b96 /drivers/scsi/scsi_sysfs.c
parent67b2009ae26ece6a54d0b689827903f53d6d21e6 (diff)
downloadlinux-1dfcda06a67d6ad6f890dbd1bab84be5f17ef46d.tar.bz2
[SCSI] kill scsi host template suspend/resume
With libata converted to use sdev->manage_start_stop for suspend and resume, sht->suspend/resume() has no user left and low level suspend/ressume should be taken care of by low level driver's suspend/resume callbacks (e.g. PCI or PCMCIA driver callbacks). This patch removes sht->suspend/resume() callbacks. This change is suggested by Christoph Hellwig. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 67a38a1409ba..ed720863ab97 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -293,30 +293,18 @@ static int scsi_bus_suspend(struct device * dev, pm_message_t state)
{
struct device_driver *drv = dev->driver;
struct scsi_device *sdev = to_scsi_device(dev);
- struct scsi_host_template *sht = sdev->host->hostt;
int err;
err = scsi_device_quiesce(sdev);
if (err)
return err;
- /* call HLD suspend first */
if (drv && drv->suspend) {
err = drv->suspend(dev, state);
if (err)
return err;
}
- /* then, call host suspend */
- if (sht->suspend) {
- err = sht->suspend(sdev, state);
- if (err) {
- if (drv && drv->resume)
- drv->resume(dev);
- return err;
- }
- }
-
return 0;
}
@@ -324,21 +312,14 @@ static int scsi_bus_resume(struct device * dev)
{
struct device_driver *drv = dev->driver;
struct scsi_device *sdev = to_scsi_device(dev);
- struct scsi_host_template *sht = sdev->host->hostt;
- int err = 0, err2 = 0;
-
- /* call host resume first */
- if (sht->resume)
- err = sht->resume(sdev);
+ int err = 0;
- /* then, call HLD resume */
if (drv && drv->resume)
- err2 = drv->resume(dev);
+ err = drv->resume(dev);
scsi_device_resume(sdev);
- /* favor LLD failure */
- return err ? err : err2;;
+ return err;
}
struct bus_type scsi_bus_type = {