summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_proc.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2008-03-18 14:32:28 +0100
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-22 22:16:29 +0200
commitb0ed43360fdca227048d88a08290365cb681c1a8 (patch)
treec4bec4f311c2d73159df6fe35986442968aae8c9 /drivers/scsi/scsi_proc.c
parent[SCSI] ses: fix up functionality after class_device->device conversion (diff)
downloadlinux-b0ed43360fdca227048d88a08290365cb681c1a8.tar.xz
linux-b0ed43360fdca227048d88a08290365cb681c1a8.zip
[SCSI] add scsi_host and scsi_target to scsi_bus
This patch implements scsi_host and scsi_target device types and adds both to the scsi_bus. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_proc.c')
-rw-r--r--drivers/scsi/scsi_proc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index ed395154a5b1..3a1c99d5c775 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -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;
}