Commit e431f12e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

remove cdev_set_name completely as it is not needed.

parent fa31a260
......@@ -2274,9 +2274,6 @@ int tty_register_driver(struct tty_driver *driver)
driver->termios_locked = NULL;
}
cdev_set_name(&driver->cdev, driver->name);
for (s = strchr(driver->cdev.kobj.name, '/'); s; s = strchr(s, '/'))
*s = '!';
cdev_init(&driver->cdev, &tty_fops);
driver->cdev.owner = driver->owner;
error = cdev_add(&driver->cdev, dev, driver->num);
......@@ -2414,7 +2411,6 @@ static struct cdev vc0_cdev;
*/
static int __init tty_init(void)
{
cdev_set_name(&tty_cdev, "dev.tty");
cdev_init(&tty_cdev, &tty_fops);
if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
......@@ -2422,7 +2418,6 @@ static int __init tty_init(void)
devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty");
class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
cdev_set_name(&console_cdev, "dev.console");
cdev_init(&console_cdev, &console_fops);
if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
......@@ -2431,7 +2426,6 @@ static int __init tty_init(void)
class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
#ifdef CONFIG_UNIX98_PTYS
cdev_set_name(&ptmx_cdev, "dev.ptmx");
cdev_init(&ptmx_cdev, &tty_fops);
if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
......@@ -2441,7 +2435,6 @@ static int __init tty_init(void)
#endif
#ifdef CONFIG_VT
cdev_set_name(&vc0_cdev, "dev.vc0");
cdev_init(&vc0_cdev, &console_fops);
if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
......
......@@ -1266,7 +1266,6 @@ static int __init amdtp_init_module (void)
{
cdev_init(&amdtp_cdev, &amdtp_fops);
amdtp_cdev.owner = THIS_MODULE;
cdev_set_name(&amdtp_cdev, "amdtp");
if (cdev_add(&amdtp_cdev, IEEE1394_AMDTP_DEV, 16)) {
HPSB_ERR("amdtp: unable to add char device");
return -EIO;
......
......@@ -2616,7 +2616,6 @@ static int __init dv1394_init_module(void)
cdev_init(&dv1394_cdev, &dv1394_fops);
dv1394_cdev.owner = THIS_MODULE;
cdev_set_name(&dv1394_cdev, "dv1394");
ret = cdev_add(&dv1394_cdev, IEEE1394_DV1394_DEV, 16);
if (ret) {
printk(KERN_ERR "dv1394: unable to register character device\n");
......
......@@ -2746,7 +2746,6 @@ static int __init init_raw1394(void)
cdev_init(&raw1394_cdev, &raw1394_fops);
raw1394_cdev.owner = THIS_MODULE;
cdev_set_name(&raw1394_cdev, RAW1394_DEVICE_NAME);
ret = cdev_add(&raw1394_cdev, IEEE1394_RAW1394_DEV, 1);
if (ret) {
/* jmc: leaves reference to (static) raw1394_cdev */
......
......@@ -1457,7 +1457,6 @@ static int __init video1394_init_module (void)
cdev_init(&video1394_cdev, &video1394_fops);
video1394_cdev.owner = THIS_MODULE;
cdev_set_name(&video1394_cdev, VIDEO1394_DRIVER_NAME);
ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16);
if (ret) {
PRINT_G(KERN_ERR, "video1394: unable to get minor device block");
......
......@@ -46,9 +46,6 @@ struct cdev *register_tape_dev(
cdev->owner = fops->owner;
cdev->ops = fops;
cdev->dev = dev;
cdev_set_name(cdev, devname);
for (s = strchr(cdev->kobj.name, '/'); s; s = strchr(s, '/'))
*s = '!';
rc = cdev_add(cdev, cdev->dev, 1);
if (rc) {
......
......@@ -1409,7 +1409,6 @@ sg_add(struct class_device *cl_dev)
SCSI_LOG_TIMEOUT(3, printk("sg_add: dev=%d \n", k));
memset(sdp, 0, sizeof(*sdp));
sprintf(disk->disk_name, "sg%d", k);
cdev_set_name(cdev, disk->disk_name);
cdev->owner = THIS_MODULE;
cdev->ops = &sg_fops;
disk->major = SCSI_GENERIC_MAJOR;
......
......@@ -3888,7 +3888,6 @@ static int st_probe(struct device *dev)
dev_num);
goto out_free_tape;
}
cdev_set_name(cdev, "%sm%d%s", disk->disk_name, mode, j ? "n" : "");
cdev->owner = THIS_MODULE;
cdev->ops = &st_fops;
......
......@@ -25,7 +25,5 @@ void cdev_del(struct cdev *);
void cd_forget(struct inode *);
#define cdev_set_name(cdev, args...) kobject_set_name(&((cdev)->kobj), ##args)
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment