aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-01-14 18:46:59 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-14 21:11:02 -0500
commitd8cf5389bd9d1f0ac9fea51796c274ba64b83d80 (patch)
treeb6f6c10b9d7ca625ad531bd5ca1778d354fb15d5 /drivers/ata
parentc2e14f11120bbef0c883e795da8180b58f3cddae (diff)
libata: relocate sdev->manage_start_stop configuration
After 9b8e8de7, manage_start_stop configuration depends on valid ATA device. Move it into ata_scsi_dev_config(). This was detected by the coverity checker. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 264ae60e3fd8..14daf4848f09 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -841,6 +841,9 @@ static void ata_scsi_dev_config(struct scsi_device *sdev,
841 blk_queue_max_hw_segments(q, q->max_hw_segments - 1); 841 blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
842 } 842 }
843 843
844 if (dev->class == ATA_DEV_ATA)
845 sdev->manage_start_stop = 1;
846
844 if (dev->flags & ATA_DFLAG_AN) 847 if (dev->flags & ATA_DFLAG_AN)
845 set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); 848 set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
846 849
@@ -872,9 +875,6 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
872 875
873 ata_scsi_sdev_config(sdev); 876 ata_scsi_sdev_config(sdev);
874 877
875 if (dev->class == ATA_DEV_ATA)
876 sdev->manage_start_stop = 1;
877
878 if (dev) 878 if (dev)
879 ata_scsi_dev_config(sdev, dev); 879 ata_scsi_dev_config(sdev, dev);
880 880