aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/osst.c24
-rw-r--r--drivers/scsi/scsi.c3
-rw-r--r--drivers/scsi/scsi_scan.c6
-rw-r--r--drivers/scsi/sd.c2
-rw-r--r--drivers/scsi/sg.c10
-rw-r--r--drivers/scsi/sr.c2
-rw-r--r--drivers/scsi/st.c20
-rw-r--r--include/scsi/scsi_device.h1
8 files changed, 5 insertions, 63 deletions
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index d9946bd95492..b9f6084fdd9e 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -48,7 +48,6 @@ static const char * osst_version = "0.99.3";
48#include <linux/vmalloc.h> 48#include <linux/vmalloc.h>
49#include <linux/blkdev.h> 49#include <linux/blkdev.h>
50#include <linux/moduleparam.h> 50#include <linux/moduleparam.h>
51#include <linux/devfs_fs_kernel.h>
52#include <linux/delay.h> 51#include <linux/delay.h>
53#include <asm/uaccess.h> 52#include <asm/uaccess.h>
54#include <asm/dma.h> 53#include <asm/dma.h>
@@ -107,8 +106,6 @@ static struct osst_dev_parm {
107}; 106};
108#endif 107#endif
109 108
110static char *osst_formats[ST_NBR_MODES] ={"", "l", "m", "a"};
111
112/* Some default definitions have been moved to osst_options.h */ 109/* Some default definitions have been moved to osst_options.h */
113#define OSST_BUFFER_SIZE (OSST_BUFFER_BLOCKS * ST_KILOBYTE) 110#define OSST_BUFFER_SIZE (OSST_BUFFER_BLOCKS * ST_KILOBYTE)
114#define OSST_WRITE_THRESHOLD (OSST_WRITE_THRESHOLD_BLOCKS * ST_KILOBYTE) 111#define OSST_WRITE_THRESHOLD (OSST_WRITE_THRESHOLD_BLOCKS * ST_KILOBYTE)
@@ -5667,7 +5664,7 @@ static int osst_probe(struct device *dev)
5667 struct st_partstat * STps; 5664 struct st_partstat * STps;
5668 struct osst_buffer * buffer; 5665 struct osst_buffer * buffer;
5669 struct gendisk * drive; 5666 struct gendisk * drive;
5670 int i, mode, dev_num; 5667 int i, dev_num;
5671 5668
5672 if (SDp->type != TYPE_TAPE || !osst_supports(SDp)) 5669 if (SDp->type != TYPE_TAPE || !osst_supports(SDp))
5673 return -ENODEV; 5670 return -ENODEV;
@@ -5803,18 +5800,6 @@ static int osst_probe(struct device *dev)
5803 snprintf(name, 8, "%s%s", "n", tape_name(tpnt)); 5800 snprintf(name, 8, "%s%s", "n", tape_name(tpnt));
5804 osst_sysfs_add(MKDEV(OSST_MAJOR, dev_num + 128), dev, tpnt, name); 5801 osst_sysfs_add(MKDEV(OSST_MAJOR, dev_num + 128), dev, tpnt, name);
5805 } 5802 }
5806 for (mode = 0; mode < ST_NBR_MODES; ++mode) {
5807 /* Rewind entry */
5808 devfs_mk_cdev(MKDEV(OSST_MAJOR, dev_num + (mode << 5)),
5809 S_IFCHR | S_IRUGO | S_IWUGO,
5810 "%s/ot%s", SDp->devfs_name, osst_formats[mode]);
5811
5812 /* No-rewind entry */
5813 devfs_mk_cdev(MKDEV(OSST_MAJOR, dev_num + (mode << 5) + 128),
5814 S_IFCHR | S_IRUGO | S_IWUGO,
5815 "%s/ot%sn", SDp->devfs_name, osst_formats[mode]);
5816 }
5817 drive->number = devfs_register_tape(SDp->devfs_name);
5818 5803
5819 sdev_printk(KERN_INFO, SDp, 5804 sdev_printk(KERN_INFO, SDp,
5820 "osst :I: Attached OnStream %.5s tape as %s\n", 5805 "osst :I: Attached OnStream %.5s tape as %s\n",
@@ -5831,7 +5816,7 @@ static int osst_remove(struct device *dev)
5831{ 5816{
5832 struct scsi_device * SDp = to_scsi_device(dev); 5817 struct scsi_device * SDp = to_scsi_device(dev);
5833 struct osst_tape * tpnt; 5818 struct osst_tape * tpnt;
5834 int i, mode; 5819 int i;
5835 5820
5836 if ((SDp->type != TYPE_TAPE) || (osst_nr_dev <= 0)) 5821 if ((SDp->type != TYPE_TAPE) || (osst_nr_dev <= 0))
5837 return 0; 5822 return 0;
@@ -5842,11 +5827,6 @@ static int osst_remove(struct device *dev)
5842 osst_sysfs_destroy(MKDEV(OSST_MAJOR, i)); 5827 osst_sysfs_destroy(MKDEV(OSST_MAJOR, i));
5843 osst_sysfs_destroy(MKDEV(OSST_MAJOR, i+128)); 5828 osst_sysfs_destroy(MKDEV(OSST_MAJOR, i+128));
5844 tpnt->device = NULL; 5829 tpnt->device = NULL;
5845 for (mode = 0; mode < ST_NBR_MODES; ++mode) {
5846 devfs_remove("%s/ot%s", SDp->devfs_name, osst_formats[mode]);
5847 devfs_remove("%s/ot%sn", SDp->devfs_name, osst_formats[mode]);
5848 }
5849 devfs_unregister_tape(tpnt->drive->number);
5850 put_disk(tpnt->drive); 5830 put_disk(tpnt->drive);
5851 os_scsi_tapes[i] = NULL; 5831 os_scsi_tapes[i] = NULL;
5852 osst_nr_dev--; 5832 osst_nr_dev--;
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 11b27ba0cd41..6913b0623167 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -48,7 +48,6 @@
48#include <linux/delay.h> 48#include <linux/delay.h>
49#include <linux/init.h> 49#include <linux/init.h>
50#include <linux/completion.h> 50#include <linux/completion.h>
51#include <linux/devfs_fs_kernel.h>
52#include <linux/unistd.h> 51#include <linux/unistd.h>
53#include <linux/spinlock.h> 52#include <linux/spinlock.h>
54#include <linux/kmod.h> 53#include <linux/kmod.h>
@@ -1247,7 +1246,6 @@ static int __init init_scsi(void)
1247 for_each_cpu(i) 1246 for_each_cpu(i)
1248 INIT_LIST_HEAD(&per_cpu(scsi_done_q, i)); 1247 INIT_LIST_HEAD(&per_cpu(scsi_done_q, i));
1249 1248
1250 devfs_mk_dir("scsi");
1251 printk(KERN_NOTICE "SCSI subsystem initialized\n"); 1249 printk(KERN_NOTICE "SCSI subsystem initialized\n");
1252 return 0; 1250 return 0;
1253 1251
@@ -1272,7 +1270,6 @@ static void __exit exit_scsi(void)
1272 scsi_exit_sysctl(); 1270 scsi_exit_sysctl();
1273 scsi_exit_hosts(); 1271 scsi_exit_hosts();
1274 scsi_exit_devinfo(); 1272 scsi_exit_devinfo();
1275 devfs_remove("scsi");
1276 scsi_exit_procfs(); 1273 scsi_exit_procfs();
1277 scsi_exit_queue(); 1274 scsi_exit_queue();
1278} 1275}
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 74863da1d630..dfdbbd008630 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -687,12 +687,8 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
687 if (inq_result[7] & 0x10) 687 if (inq_result[7] & 0x10)
688 sdev->sdtr = 1; 688 sdev->sdtr = 1;
689 689
690 sprintf(sdev->devfs_name, "scsi/host%d/bus%d/target%d/lun%d",
691 sdev->host->host_no, sdev->channel,
692 sdev->id, sdev->lun);
693
694 /* 690 /*
695 * End driverfs/devfs code. 691 * End sysfs code.
696 */ 692 */
697 693
698 if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) && 694 if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) &&
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8ba2d988d051..76b4d14c0b3f 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1571,8 +1571,6 @@ static int sd_probe(struct device *dev)
1571 'a' + m1, 'a' + m2, 'a' + m3); 1571 'a' + m1, 'a' + m2, 'a' + m3);
1572 } 1572 }
1573 1573
1574 strcpy(gd->devfs_name, sdp->devfs_name);
1575
1576 gd->private_data = &sdkp->driver; 1574 gd->private_data = &sdkp->driver;
1577 gd->queue = sdkp->device->request_queue; 1575 gd->queue = sdkp->device->request_queue;
1578 1576
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index ecf2f6010e76..06fc8ed720fc 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -44,7 +44,6 @@ static int sg_version_num = 30533; /* 2 digits for each component */
44#include <linux/poll.h> 44#include <linux/poll.h>
45#include <linux/smp_lock.h> 45#include <linux/smp_lock.h>
46#include <linux/moduleparam.h> 46#include <linux/moduleparam.h>
47#include <linux/devfs_fs_kernel.h>
48#include <linux/cdev.h> 47#include <linux/cdev.h>
49#include <linux/seq_file.h> 48#include <linux/seq_file.h>
50#include <linux/blkdev.h> 49#include <linux/blkdev.h>
@@ -1456,14 +1455,10 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf)
1456 k = error; 1455 k = error;
1457 sdp = sg_dev_arr[k]; 1456 sdp = sg_dev_arr[k];
1458 1457
1459 devfs_mk_cdev(MKDEV(SCSI_GENERIC_MAJOR, k),
1460 S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
1461 "%s/generic", scsidp->devfs_name);
1462 error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, k), 1); 1458 error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, k), 1);
1463 if (error) { 1459 if (error)
1464 devfs_remove("%s/generic", scsidp->devfs_name);
1465 goto out; 1460 goto out;
1466 } 1461
1467 sdp->cdev = cdev; 1462 sdp->cdev = cdev;
1468 if (sg_sysfs_valid) { 1463 if (sg_sysfs_valid) {
1469 struct class_device * sg_class_member; 1464 struct class_device * sg_class_member;
@@ -1553,7 +1548,6 @@ sg_remove(struct class_device *cl_dev, struct class_interface *cl_intf)
1553 class_device_destroy(sg_sysfs_class, MKDEV(SCSI_GENERIC_MAJOR, k)); 1548 class_device_destroy(sg_sysfs_class, MKDEV(SCSI_GENERIC_MAJOR, k));
1554 cdev_del(sdp->cdev); 1549 cdev_del(sdp->cdev);
1555 sdp->cdev = NULL; 1550 sdp->cdev = NULL;
1556 devfs_remove("%s/generic", scsidp->devfs_name);
1557 put_disk(sdp->disk); 1551 put_disk(sdp->disk);
1558 sdp->disk = NULL; 1552 sdp->disk = NULL;
1559 if (NULL == sdp->headfp) 1553 if (NULL == sdp->headfp)
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index d8d12a1718bf..328837b7ccb9 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -573,8 +573,6 @@ static int sr_probe(struct device *dev)
573 get_capabilities(cd); 573 get_capabilities(cd);
574 sr_vendor_init(cd); 574 sr_vendor_init(cd);
575 575
576 snprintf(disk->devfs_name, sizeof(disk->devfs_name),
577 "%s/cd", sdev->devfs_name);
578 disk->driverfs_dev = &sdev->sdev_gendev; 576 disk->driverfs_dev = &sdev->sdev_gendev;
579 set_capacity(disk, cd->capacity); 577 set_capacity(disk, cd->capacity);
580 disk->private_data = &cd->driver; 578 disk->private_data = &cd->driver;
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index f0606da19d02..31c6eefba9d6 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -35,7 +35,6 @@ static const char *verstr = "20050830";
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <linux/blkdev.h> 36#include <linux/blkdev.h>
37#include <linux/moduleparam.h> 37#include <linux/moduleparam.h>
38#include <linux/devfs_fs_kernel.h>
39#include <linux/cdev.h> 38#include <linux/cdev.h>
40#include <linux/delay.h> 39#include <linux/delay.h>
41#include <linux/mutex.h> 40#include <linux/mutex.h>
@@ -4053,21 +4052,6 @@ static int st_probe(struct device *dev)
4053 do_create_class_files(tpnt, dev_num, mode); 4052 do_create_class_files(tpnt, dev_num, mode);
4054 } 4053 }
4055 4054
4056 for (mode = 0; mode < ST_NBR_MODES; ++mode) {
4057 /* Make sure that the minor numbers corresponding to the four
4058 first modes always get the same names */
4059 i = mode << (4 - ST_NBR_MODE_BITS);
4060 /* Rewind entry */
4061 devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 0)),
4062 S_IFCHR | S_IRUGO | S_IWUGO,
4063 "%s/mt%s", SDp->devfs_name, st_formats[i]);
4064 /* No-rewind entry */
4065 devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 1)),
4066 S_IFCHR | S_IRUGO | S_IWUGO,
4067 "%s/mt%sn", SDp->devfs_name, st_formats[i]);
4068 }
4069 disk->number = devfs_register_tape(SDp->devfs_name);
4070
4071 sdev_printk(KERN_WARNING, SDp, 4055 sdev_printk(KERN_WARNING, SDp,
4072 "Attached scsi tape %s", tape_name(tpnt)); 4056 "Attached scsi tape %s", tape_name(tpnt));
4073 printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n", 4057 printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
@@ -4121,13 +4105,9 @@ static int st_remove(struct device *dev)
4121 scsi_tapes[i] = NULL; 4105 scsi_tapes[i] = NULL;
4122 st_nr_dev--; 4106 st_nr_dev--;
4123 write_unlock(&st_dev_arr_lock); 4107 write_unlock(&st_dev_arr_lock);
4124 devfs_unregister_tape(tpnt->disk->number);
4125 sysfs_remove_link(&tpnt->device->sdev_gendev.kobj, 4108 sysfs_remove_link(&tpnt->device->sdev_gendev.kobj,
4126 "tape"); 4109 "tape");
4127 for (mode = 0; mode < ST_NBR_MODES; ++mode) { 4110 for (mode = 0; mode < ST_NBR_MODES; ++mode) {
4128 j = mode << (4 - ST_NBR_MODE_BITS);
4129 devfs_remove("%s/mt%s", SDp->devfs_name, st_formats[j]);
4130 devfs_remove("%s/mt%sn", SDp->devfs_name, st_formats[j]);
4131 for (j=0; j < 2; j++) { 4111 for (j=0; j < 2; j++) {
4132 class_device_destroy(st_sysfs_class, 4112 class_device_destroy(st_sysfs_class,
4133 MKDEV(SCSI_TAPE_MAJOR, 4113 MKDEV(SCSI_TAPE_MAJOR,
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 290e3b4d2aec..cde84b39bb65 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -73,7 +73,6 @@ struct scsi_device {
73 unsigned sector_size; /* size in bytes */ 73 unsigned sector_size; /* size in bytes */
74 74
75 void *hostdata; /* available to low-level driver */ 75 void *hostdata; /* available to low-level driver */
76 char devfs_name[256]; /* devfs junk */
77 char type; 76 char type;
78 char scsi_level; 77 char scsi_level;
79 char inq_periph_qual; /* PQ from INQUIRY data */ 78 char inq_periph_qual; /* PQ from INQUIRY data */