Merge /spare/repo/linux-2.6/
[linux-3.10.git] / drivers / scsi / libata-scsi.c
index f8ddc2a29e9a744cd32b50a059da6e7430730734..03b7a6dd95fe0aadf3dbcb2dcaa69136151dc69b 100644 (file)
@@ -1537,10 +1537,10 @@ ata_scsi_find_dev(struct ata_port *ap, struct scsi_device *scsidev)
        if (unlikely(!ata_dev_present(dev)))
                return NULL;
 
-#ifndef ATA_ENABLE_ATAPI
-       if (unlikely(dev->class == ATA_DEV_ATAPI))
-               return NULL;
-#endif
+       if (!atapi_enabled) {
+               if (unlikely(dev->class == ATA_DEV_ATAPI))
+                       return NULL;
+       }
 
        return dev;
 }