spelling fixes
[pandora-kernel.git] / drivers / scsi / st.c
index f0606da..b5218fc 100644 (file)
@@ -35,7 +35,6 @@ static const char *verstr = "20050830";
 #include <linux/spinlock.h>
 #include <linux/blkdev.h>
 #include <linux/moduleparam.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/cdev.h>
 #include <linux/delay.h>
 #include <linux/mutex.h>
@@ -87,8 +86,9 @@ static int st_nr_dev;
 static struct class *st_sysfs_class;
 
 MODULE_AUTHOR("Kai Makisara");
-MODULE_DESCRIPTION("SCSI Tape Driver");
+MODULE_DESCRIPTION("SCSI tape (st) driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV_MAJOR(SCSI_TAPE_MAJOR);
 
 /* Set 'perm' (4th argument) to 0 to disable module_param's definition
  * of sysfs parameters (which module_param doesn't yet support).
@@ -1193,7 +1193,7 @@ static int st_open(struct inode *inode, struct file *filp)
 \f
 
 /* Flush the tape buffer before close */
-static int st_flush(struct file *filp)
+static int st_flush(struct file *filp, fl_owner_t id)
 {
        int result = 0, result2;
        unsigned char cmd[MAX_COMMAND_SIZE];
@@ -2818,7 +2818,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
                    (cmdstatp->sense_hdr.sense_key == NO_SENSE ||
                     cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) &&
                    undone == 0) {
-                       ioctl_result = 0;       /* EOF written succesfully at EOM */
+                       ioctl_result = 0;       /* EOF written successfully at EOM */
                        if (fileno >= 0)
                                fileno++;
                        STps->drv_file = fileno;
@@ -3839,7 +3839,7 @@ static int __init st_setup(char *str)
                                        break;
                                }
                        }
-                       if (i >= sizeof(parms) / sizeof(struct st_dev_parm))
+                       if (i >= ARRAY_SIZE(parms))
                                 printk(KERN_WARNING "st: invalid parameter in '%s'\n",
                                        stp);
                        stp = strchr(stp, ',');
@@ -4053,23 +4053,8 @@ static int st_probe(struct device *dev)
                do_create_class_files(tpnt, dev_num, mode);
        }
 
-       for (mode = 0; mode < ST_NBR_MODES; ++mode) {
-               /* Make sure that the minor numbers corresponding to the four
-                  first modes always get the same names */
-               i = mode << (4 - ST_NBR_MODE_BITS);
-               /*  Rewind entry  */
-               devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 0)),
-                             S_IFCHR | S_IRUGO | S_IWUGO,
-                             "%s/mt%s", SDp->devfs_name, st_formats[i]);
-               /*  No-rewind entry  */
-               devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 1)),
-                             S_IFCHR | S_IRUGO | S_IWUGO,
-                             "%s/mt%sn", SDp->devfs_name, st_formats[i]);
-       }
-       disk->number = devfs_register_tape(SDp->devfs_name);
-
        sdev_printk(KERN_WARNING, SDp,
-                   "Attached scsi tape %s", tape_name(tpnt));
+                   "Attached scsi tape %s\n", tape_name(tpnt));
        printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
               tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
               queue_dma_alignment(SDp->request_queue) + 1);
@@ -4121,13 +4106,9 @@ static int st_remove(struct device *dev)
                        scsi_tapes[i] = NULL;
                        st_nr_dev--;
                        write_unlock(&st_dev_arr_lock);
-                       devfs_unregister_tape(tpnt->disk->number);
                        sysfs_remove_link(&tpnt->device->sdev_gendev.kobj,
                                          "tape");
                        for (mode = 0; mode < ST_NBR_MODES; ++mode) {
-                               j = mode << (4 - ST_NBR_MODE_BITS);
-                               devfs_remove("%s/mt%s", SDp->devfs_name, st_formats[j]);
-                               devfs_remove("%s/mt%sn", SDp->devfs_name, st_formats[j]);
                                for (j=0; j < 2; j++) {
                                        class_device_destroy(st_sysfs_class,
                                                             MKDEV(SCSI_TAPE_MAJOR,