Skip to content

Commit

Permalink
libata: relocate sdev->manage_start_stop configuration
Browse files Browse the repository at this point in the history
After 9b8e8de, 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>
  • Loading branch information
htejun authored and Jeff Garzik committed Jan 15, 2008
1 parent c2e14f1 commit d8cf538
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/ata/libata-scsi.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit d8cf538

Please sign in to comment.