Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[pandora-kernel.git] / drivers / scsi / scsi_proc.c
index 55200e4..bb6f051 100644 (file)
@@ -178,12 +178,9 @@ static int proc_print_scsidevice(struct device *dev, void *data)
 
        seq_printf(s, "\n");
 
-       seq_printf(s, "  Type:   %s ",
-                    sdev->type < MAX_SCSI_DEVICE_CODE ?
-              scsi_device_types[(int) sdev->type] : "Unknown          ");
-       seq_printf(s, "               ANSI"
-                    " SCSI revision: %02x", (sdev->scsi_level - 1) ?
-                    sdev->scsi_level - 1 : 1);
+       seq_printf(s, "  Type:   %s ", scsi_device_type(sdev->type));
+       seq_printf(s, "               ANSI  SCSI revision: %02x",
+                       sdev->scsi_level - (sdev->scsi_level > 1));
        if (sdev->scsi_level == 2)
                seq_printf(s, " CCS\n");
        else
@@ -310,7 +307,7 @@ static int proc_scsi_open(struct inode *inode, struct file *file)
        return single_open(file, proc_scsi_show, NULL);
 }
 
-static struct file_operations proc_scsi_operations = {
+static const struct file_operations proc_scsi_operations = {
        .open           = proc_scsi_open,
        .read           = seq_read,
        .write          = proc_scsi_write,