[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <478BF473.9050602@gmail.com>
Date: Tue, 15 Jan 2008 08:46:59 +0900
From: Tejun Heo <htejun@...il.com>
To: Adrian Bunk <bunk@...nel.org>
CC: Ondrej Zary <linux@...nbow-software.org>,
Jeff Garzik <jgarzik@...hat.com>, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH #upstream-fixes] 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@...il.com>
Cc: Adrian Bunk <bunk@...nel.org>
---
drivers/ata/libata-scsi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 7c13663..a6575b7 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,
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists