2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 08:38:24 +08:00

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>
This commit is contained in:
Tejun Heo 2008-01-15 08:46:59 +09:00 committed by Jeff Garzik
parent c2e14f1112
commit d8cf5389bd

View File

@ -841,6 +841,9 @@ static void ata_scsi_dev_config(struct scsi_device *sdev,
blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
}
if (dev->class == ATA_DEV_ATA)
sdev->manage_start_stop = 1;
if (dev->flags & ATA_DFLAG_AN)
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
@ -872,9 +875,6 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
ata_scsi_sdev_config(sdev);
if (dev->class == ATA_DEV_ATA)
sdev->manage_start_stop = 1;
if (dev)
ata_scsi_dev_config(sdev, dev);