aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
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 */