]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/scsi_scan.c
[SCSI] add inline functions for recognising created and blocked states
[linux-2.6-omap-h63xx.git] / drivers / scsi / scsi_scan.c
index 34d0de6cd51123cb42d7cda2bc4b62a2f5151c9b..2926baaac31edd58c223c7941a57fdc64a9ab93b 100644 (file)
@@ -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
                 */