]> err.no Git - linux-2.6/blobdiff - drivers/scsi/scsi_proc.c
[SCSI] scsi_transport_spi: include sysfs.h
[linux-2.6] / drivers / scsi / scsi_proc.c
index ed395154a5b189e4043c271da8fc9042178a043d..3a1c99d5c775482efedcf2a550218c23e3cf139d 100644 (file)
@@ -190,10 +190,14 @@ void scsi_proc_host_rm(struct Scsi_Host *shost)
  */
 static int proc_print_scsidevice(struct device *dev, void *data)
 {
-       struct scsi_device *sdev = to_scsi_device(dev);
+       struct scsi_device *sdev;
        struct seq_file *s = data;
        int i;
 
+       if (!scsi_is_sdev_device(dev))
+               goto out;
+
+       sdev = to_scsi_device(dev);
        seq_printf(s,
                "Host: scsi%d Channel: %02d Id: %02d Lun: %02d\n  Vendor: ",
                sdev->host->host_no, sdev->channel, sdev->id, sdev->lun);
@@ -230,6 +234,7 @@ static int proc_print_scsidevice(struct device *dev, void *data)
        else
                seq_printf(s, "\n");
 
+out:
        return 0;
 }