]> err.no Git - linux-2.6/commitdiff
[PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Jun 2005 04:15:16 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Jun 2006 19:25:08 +0000 (12:25 -0700)
And remove the now unneeded number field.
Also fixes all drivers that set these fields.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29 files changed:
arch/um/drivers/ubd_kern.c
drivers/block/DAC960.c
drivers/block/acsi.c
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/block/loop.c
drivers/block/nbd.c
drivers/block/ps2esdi.c
drivers/block/rd.c
drivers/block/swim3.c
drivers/block/sx8.c
drivers/block/ub.c
drivers/block/umem.c
drivers/block/viodasd.c
drivers/block/xd.c
drivers/block/z2ram.c
drivers/cdrom/aztcd.c
drivers/cdrom/gscd.c
drivers/cdrom/optcd.c
drivers/cdrom/sbpcd.c
drivers/cdrom/sjcd.c
drivers/cdrom/sonycd535.c
drivers/cdrom/viocd.c
drivers/md/md.c
drivers/message/i2o/i2o_block.c
drivers/mmc/mmc_block.c
drivers/s390/block/dasd_genhd.c
drivers/s390/block/xpram.c
include/linux/genhd.h

index 5856a02fff58f1939447ccd2fc3772a644c6b8f6..c3e205b6a4c9d5b05522cfbe1bc04f894ccf3fc9 100644 (file)
@@ -637,14 +637,10 @@ static int ubd_new_disk(int major, u64 size, int unit,
        disk->first_minor = unit << UBD_SHIFT;
        disk->fops = &ubd_blops;
        set_capacity(disk, size / 512);
-       if(major == MAJOR_NR){
+       if(major == MAJOR_NR)
                sprintf(disk->disk_name, "ubd%c", 'a' + unit);
-               sprintf(disk->devfs_name, "ubd/disc%d", unit);
-       }
-       else {
+       else
                sprintf(disk->disk_name, "ubd_fake%d", unit);
-               sprintf(disk->devfs_name, "ubd_fake/disc%d", unit);
-       }
 
        /* sysfs register (not for ide fake devices) */
        if (major == MAJOR_NR) {
index dd8a1501142f9a7acab30803c86d5390d666dbf4..50ca1aa4ee3b3956550f23fce6d1b098f0c86e30 100644 (file)
@@ -2530,7 +2530,6 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
        blk_queue_max_sectors(RequestQueue, Controller->MaxBlocksPerCommand);
        disk->queue = RequestQueue;
        sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n);
-       sprintf(disk->devfs_name, "rd/host%d/target%d", Controller->ControllerNumber, n);
        disk->major = MajorNumber;
        disk->first_minor = n << DAC960_MaxPartitionsBits;
        disk->fops = &DAC960_BlockDeviceOperations;
index 196c0ec9cd5421da1c1f278d15fc66e5d474b8f4..a317e43039526ab586eae5a1f2bb73a9fe31345c 100644 (file)
@@ -1732,13 +1732,10 @@ int acsi_init( void )
                struct gendisk *disk = acsi_gendisk[i];
                sprintf(disk->disk_name, "ad%c", 'a'+i);
                aip = &acsi_info[NDevices];
-               sprintf(disk->devfs_name, "ad/target%d/lun%d", aip->target, aip->lun);
                disk->major = ACSI_MAJOR;
                disk->first_minor = i << 4;
-               if (acsi_info[i].type != HARDDISK) {
+               if (acsi_info[i].type != HARDDISK)
                        disk->minors = 1;
-                       strcat(disk->devfs_name, "/disc");
-               }
                disk->fops = &acsi_fops;
                disk->private_data = &acsi_info[i];
                set_capacity(disk, acsi_info[i].size);
index 39b0f53186e8a2a6532799c6ac172c4eeab7b96e..05fb08312c01c619fbc176a5246f277d4a90b34a 100644 (file)
@@ -3248,7 +3248,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
 
                q->queuedata = hba[i];
                sprintf(disk->disk_name, "cciss/c%dd%d", i, j);
-               sprintf(disk->devfs_name, "cciss/host%d/target%d", i, j);
                disk->major = hba[i]->major;
                disk->first_minor = j << NWD_SHIFT;
                disk->fops = &cciss_fops;
index f96e6c03593e4859795bae5d582dac3a0cbd469a..bfd245df0a8c5bb81a79828d38b65b153e5dd0e3 100644 (file)
@@ -1805,8 +1805,6 @@ static void getgeometry(int ctlr)
 
                                }
 
-                               sprintf(disk->devfs_name, "ida/c%dd%d", ctlr, log_unit);
-
                                info_p->phys_drives =
                                    sense_config_buf->ctlr_phys_drv;
                                info_p->drv_assign_map
index dbf905ce02485b02922cfd646e41650556ea3ba8..9983e72002105b8a615de657dfe0b0152b42e4ce 100644 (file)
@@ -1293,7 +1293,6 @@ static int __init loop_init(void)
                disk->first_minor = i;
                disk->fops = &lo_fops;
                sprintf(disk->disk_name, "loop%d", i);
-               sprintf(disk->devfs_name, "loop/%d", i);
                disk->private_data = lo;
                disk->queue = lo->lo_queue;
        }
index b164ee0ac79fcf3b887b33556c1b2645a8376b79..39662f0c9cce65afd9da3b397607093f05a3f026 100644 (file)
@@ -657,7 +657,6 @@ static int __init nbd_init(void)
                disk->private_data = &nbd_dev[i];
                disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
                sprintf(disk->disk_name, "nbd%d", i);
-               sprintf(disk->devfs_name, "nbd/%d", i);
                set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */
                add_disk(disk);
        }
index bea75f2cb211ca342814766f963b546071c8b223..a729013a39737b24541a999f38950c7206ae6181 100644 (file)
@@ -421,7 +421,6 @@ static int __init ps2esdi_geninit(void)
                disk->major = PS2ESDI_MAJOR;
                disk->first_minor = i<<6;
                sprintf(disk->disk_name, "ed%c", 'a'+i);
-               sprintf(disk->devfs_name, "ed/target%d", i);
                disk->fops = &ps2esdi_fops;
                ps2esdi_gendisk[i] = disk;
        }
index 536be2de989ea5c906605f3b3f2a47534b43de95..e64f26ec6140ff61b19ad742e4b53ae0447fb957 100644 (file)
@@ -457,7 +457,6 @@ static int __init rd_init(void)
                disk->queue = rd_queue[i];
                disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
                sprintf(disk->disk_name, "ram%d", i);
-               sprintf(disk->devfs_name, "rd/%d", i);
                set_capacity(disk, rd_size * 2);
                add_disk(rd_disks[i]);
        }
index ef557b1043d87a3164c75b5daa103582eec309dc..628877945f9badbae4f529f63e2add13292d35cf 100644 (file)
@@ -1061,7 +1061,6 @@ int swim3_init(void)
                disk->queue = swim3_queue;
                disk->flags |= GENHD_FL_REMOVABLE;
                sprintf(disk->disk_name, "fd%d", i);
-               sprintf(disk->devfs_name, "floppy/%d", i);
                set_capacity(disk, 2880);
                add_disk(disk);
        }
index 3a48145515686534ff05e7832fd8c0e17d8034f6..fbddeb4b04a28846cd056a25d5e43a10ccf7eb5b 100644 (file)
@@ -1509,7 +1509,6 @@ static int carm_init_disks(struct carm_host *host)
                port->disk = disk;
                sprintf(disk->disk_name, DRV_NAME "/%u",
                        (unsigned int) (host->id * CARM_MAX_PORTS) + i);
-               sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
                disk->major = host->major;
                disk->first_minor = i * CARM_MINORS_PER_MAJOR;
                disk->fops = &carm_bd_ops;
index 87ec6458bd1d90531cb0226d0177d0cd0677efe0..d62b49fbf10c319334ca6f26e49f58a46747b6f3 100644 (file)
@@ -28,7 +28,6 @@
 #include <scsi/scsi.h>
 
 #define DRV_NAME "ub"
-#define DEVFS_NAME DRV_NAME
 
 #define UB_MAJOR 180
 
@@ -2290,7 +2289,6 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum)
                goto err_diskalloc;
 
        sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a');
-       sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a');
        disk->major = UB_MAJOR;
        disk->first_minor = lun->id * UB_PARTS_PER_LUN;
        disk->fops = &ub_bd_fops;
index f7d4c65a7b8c369a76c3b7b82d8cb98ce03dcfa0..585197b95af762118d5692b0d5303b713f95f472 100644 (file)
@@ -1192,7 +1192,6 @@ static int __init mm_init(void)
        for (i = 0; i < num_cards; i++) {
                struct gendisk *disk = mm_gendisk[i];
                sprintf(disk->disk_name, "umem%c", 'a'+i);
-               sprintf(disk->devfs_name, "umem/card%d", i);
                spin_lock_init(&cards[i].lock);
                disk->major = major_nr;
                disk->first_minor  = i << MM_SHIFT;
index b0df4f5ab97afff4d490e9781fae37bd9984a210..5cc7e671b033971417ef3baae12a38cdc135e2e4 100644 (file)
@@ -523,8 +523,6 @@ retry:
        else
                snprintf(g->disk_name, sizeof(g->disk_name),
                                VIOD_GENHD_NAME "%c", 'a' + (dev_no % 26));
-       snprintf(g->devfs_name, sizeof(g->devfs_name),
-                       "%s%d", VIOD_GENHD_DEVFS_NAME, dev_no);
        g->fops = &viodasd_fops;
        g->queue = q;
        g->private_data = d;
index cbce7c5e9445638474640e59738db7b7cec3b74b..e828e4cbd3e1122a0ca3abb48e7ed2de51a6bf81 100644 (file)
@@ -215,7 +215,6 @@ static int __init xd_init(void)
                disk->major = XT_DISK_MAJOR;
                disk->first_minor = i<<6;
                sprintf(disk->disk_name, "xd%c", i+'a');
-               sprintf(disk->devfs_name, "xd/target%d", i);
                disk->fops = &xd_fops;
                disk->private_data = p;
                disk->queue = xd_queue;
index bb5e8d665a2a3ce8bd41fbd647bd06eeec772541..82ddbdd7bd4ba18f0718e388f6db83b8131992a9 100644 (file)
@@ -354,7 +354,6 @@ z2_init(void)
     z2ram_gendisk->first_minor = 0;
     z2ram_gendisk->fops = &z2_fops;
     sprintf(z2ram_gendisk->disk_name, "z2ram");
-    strcpy(z2ram_gendisk->devfs_name, z2ram_gendisk->disk_name);
 
     z2ram_gendisk->queue = z2_queue;
     add_disk(z2ram_gendisk);
index ec004897b63494e220f87a211056903731a5b122..ec469497c10ff46abbb5818d8ea8726284f05d4a 100644 (file)
@@ -1918,7 +1918,6 @@ static int __init aztcd_init(void)
        azt_disk->first_minor = 0;
        azt_disk->fops = &azt_fops;
        sprintf(azt_disk->disk_name, "aztcd");
-       sprintf(azt_disk->devfs_name, "aztcd");
        azt_disk->queue = azt_queue;
        add_disk(azt_disk);
        azt_invalidate_buffers();
index ad5464ab99bce830fc22984ff1cf77ac176c51d2..b6ee50a2916d79b6a8c9c4e9f46b6ef6443f035d 100644 (file)
@@ -955,7 +955,6 @@ static int __init gscd_init(void)
        gscd_disk->first_minor = 0;
        gscd_disk->fops = &gscd_fops;
        sprintf(gscd_disk->disk_name, "gscd");
-       sprintf(gscd_disk->devfs_name, "gscd");
 
        if (register_blkdev(MAJOR_NR, "gscd")) {
                ret = -EIO;
index 0b0eab4f40fa989dd9c215b089282bc8d8fa106a..25032d7edc55e19a3f63a8e3dfd92a70ddca767c 100644 (file)
@@ -2033,7 +2033,6 @@ static int __init optcd_init(void)
        optcd_disk->first_minor = 0;
        optcd_disk->fops = &opt_fops;
        sprintf(optcd_disk->disk_name, "optcd");
-       sprintf(optcd_disk->devfs_name, "optcd");
 
        if (!request_region(optcd_port, 4, "optcd")) {
                printk(KERN_ERR "optcd: conflict, I/O port 0x%x already used\n",
index a75b363b19c54068725f7ef5d0c2cc9a90eebd9b..2fc966c65a0e4458293150c62cba30eda352e659 100644 (file)
@@ -5868,7 +5868,6 @@ int __init sbpcd_init(void)
                disk->fops = &sbpcd_bdops;
                strcpy(disk->disk_name, sbpcd_infop->name);
                disk->flags = GENHD_FL_CD;
-               sprintf(disk->devfs_name, "sbp/c0t%d", p->drv_id);
                p->disk = disk;
                if (register_cdrom(sbpcd_infop))
                {
index 74b1cadbf161d2adc2f7d61933622bfb8f75bc5e..bf5aef4e555b2d71696e8540a3840bb1258d5f27 100644 (file)
@@ -1695,7 +1695,6 @@ static int __init sjcd_init(void)
        sjcd_disk->first_minor = 0,
        sjcd_disk->fops = &sjcd_fops,
        sprintf(sjcd_disk->disk_name, "sjcd");
-       sprintf(sjcd_disk->devfs_name, "sjcd");
 
        if (!request_region(sjcd_base, 4,"sjcd")) {
                printk
index e6565992643260580cbbcaf7e5209a1744fd97f2..8f7cc452af8da7143a7e77280ba639f909ea1857 100644 (file)
@@ -1589,7 +1589,6 @@ static int __init sony535_init(void)
        cdu_disk->first_minor = 0;
        cdu_disk->fops = &cdu_fops;
        sprintf(cdu_disk->disk_name, "cdu");
-       sprintf(cdu_disk->devfs_name, "cdu535");
 
        if (!request_region(sony535_cd_base_io, 4, CDU535_HANDLE)) {
                printk(KERN_WARNING"sonycd535: Unable to request region 0x%x\n",
index af6b3bfd169ba1ccb7dc8f77c44bafad408f7dd0..f65597081171c7382f8562f5ba26fa0d1d879e84 100644 (file)
@@ -688,8 +688,6 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
        gendisk->first_minor = deviceno;
        strncpy(gendisk->disk_name, c->name,
                        sizeof(gendisk->disk_name));
-       snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name),
-                       VIOCD_DEVICE_DEVFS "%d", deviceno);
        blk_queue_max_hw_segments(q, 1);
        blk_queue_max_phys_segments(q, 1);
        blk_queue_max_sectors(q, 4096 / 512);
index 95c275d193163be04690891e85259af85e215a8e..2ec1b3520a0b7245344610bba7fd1763beb9d25d 100644 (file)
@@ -2910,13 +2910,10 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data)
        }
        disk->major = MAJOR(dev);
        disk->first_minor = unit << shift;
-       if (partitioned) {
+       if (partitioned)
                sprintf(disk->disk_name, "md_d%d", unit);
-               sprintf(disk->devfs_name, "md/d%d", unit);
-       } else {
+       else
                sprintf(disk->disk_name, "md%d", unit);
-               sprintf(disk->devfs_name, "md/%d", unit);
-       }
        disk->fops = &md_fops;
        disk->private_data = mddev;
        disk->queue = mddev->queue;
index 7d4c5497785b3c1dd1d1709733b5a899e5547c6a..1ddc2fb429d5668a2f653c2c3e5d7561e5a4a92d 100644 (file)
@@ -1089,7 +1089,6 @@ static int i2o_block_probe(struct device *dev)
        gd = i2o_blk_dev->gd;
        gd->first_minor = unit << 4;
        sprintf(gd->disk_name, "i2o/hd%c", 'a' + unit);
-       sprintf(gd->devfs_name, "i2o/hd%c", 'a' + unit);
        gd->driverfs_dev = &i2o_dev->device;
 
        /* setup request queue */
index 46138f4e208115553a2fdaadfaf0b2c45d3cff5c..115cc21094b941a243d323756f127f905b14e0bf 100644 (file)
@@ -408,7 +408,6 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
         */
 
        sprintf(md->disk->disk_name, "mmcblk%d", devidx);
-       sprintf(md->disk->devfs_name, "mmc/blk%d", devidx);
 
        blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);
 
index fce2835e7d19a5008427665b0ef9110e8c920e2a..61ffde718a7a84f881969d0b51a5a0cd394b4829 100644 (file)
@@ -68,8 +68,6 @@ dasd_gendisk_alloc(struct dasd_device *device)
        }
        len += sprintf(gdp->disk_name + len, "%c", 'a'+(device->devindex%26));
 
-       sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id);
-
        if (device->features & DASD_FEATURE_READONLY)
                set_disk_ro(gdp, 1);
        gdp->private_data = device;
index f57a6c8816b8b2862d6493a8b6b1e96019ef0350..4c1e56b9b98dbaafa5b85cc6d74138489112248f 100644 (file)
@@ -466,7 +466,6 @@ static int __init xpram_setup_blkdev(void)
                disk->private_data = &xpram_devices[i];
                disk->queue = xpram_queue;
                sprintf(disk->disk_name, "slram%d", i);
-               sprintf(disk->devfs_name, "slram/%d", i);
                set_capacity(disk, xpram_sizes[i] << 1);
                add_disk(disk);
        }
index 3498a0c6818441cb9a81f6e329dac5fa8b03f7e3..e4af57e87c178ab0bff22b97b2e710e72a870428 100644 (file)
@@ -112,8 +112,6 @@ struct gendisk {
        sector_t capacity;
 
        int flags;
-       char devfs_name[64];            /* devfs crap */
-       int number;                     /* more of the same */
        struct device *driverfs_dev;
        struct kobject kobj;
        struct kobject *holder_dir;