summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-08-23 01:43:59 +0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 20:46:13 +0400
commit0f1d87a2acb8fd1f2ef8af109a785123ddc1a6cb (patch)
treec59113a5f6ba81983e1bc4abad235436b1842f28 /drivers/scsi/scsi_scan.c
parent22447be7d15aefcfab84e9bec4859a28198b0c62 (diff)
downloadlinux-0f1d87a2acb8fd1f2ef8af109a785123ddc1a6cb.tar.xz
[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,
*/
sdev = scsi_device_lookup_by_target(starget, lun);
if (sdev) {
- if (rescan || sdev->sdev_state != SDEV_CREATED) {
+ if (rescan || !scsi_device_created(sdev)) {
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
"scsi scan: device exists on %s\n",
sdev->sdev_gendev.bus_id));
@@ -1467,7 +1467,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
kfree(lun_data);
out:
scsi_device_put(sdev);
- if (sdev->sdev_state == SDEV_CREATED)
+ if (scsi_device_created(sdev))
/*
* the sdev we used didn't appear in the report luns scan
*/