aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-08-22 17:43:59 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 12:46:13 -0400
commit0f1d87a2acb8fd1f2ef8af109a785123ddc1a6cb (patch)
treec59113a5f6ba81983e1bc4abad235436b1842f28 /drivers/scsi/scsi_scan.c
parent22447be7d15aefcfab84e9bec4859a28198b0c62 (diff)
[SCSI] add inline functions for recognising created and blocked states
The created and blocked states are very shortly going to correspond to mixed sdev_state states. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r--drivers/scsi/scsi_scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 34d0de6cd511..2926baaac31e 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -994,7 +994,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
994 */ 994 */
995 sdev = scsi_device_lookup_by_target(starget, lun); 995 sdev = scsi_device_lookup_by_target(starget, lun);
996 if (sdev) { 996 if (sdev) {
997 if (rescan || sdev->sdev_state != SDEV_CREATED) { 997 if (rescan || !scsi_device_created(sdev)) {
998 SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO 998 SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
999 "scsi scan: device exists on %s\n", 999 "scsi scan: device exists on %s\n",
1000 sdev->sdev_gendev.bus_id)); 1000 sdev->sdev_gendev.bus_id));
@@ -1467,7 +1467,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
1467 kfree(lun_data); 1467 kfree(lun_data);
1468 out: 1468 out:
1469 scsi_device_put(sdev); 1469 scsi_device_put(sdev);
1470 if (sdev->sdev_state == SDEV_CREATED) 1470 if (scsi_device_created(sdev))
1471 /* 1471 /*
1472 * the sdev we used didn't appear in the report luns scan 1472 * the sdev we used didn't appear in the report luns scan
1473 */ 1473 */