aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 16:13:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 16:13:47 -0400
commit53baaaa9682c230410a057263d1ce2922f43ddc4 (patch)
treef5cced5622130f780d76953b284a631c3d226488 /drivers/char
parentf10140fbe5f97ecfeda986a12d0f1bad75642779 (diff)
parent3f9787046ea37a26170dc4439efa21f8d23a9978 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits) arm: bus_id -> dev_name() and dev_set_name() conversions sparc64: fix up bus_id changes in sparc core code 3c59x: handle pci_name() being const MTD: handle pci_name() being const HP iLO driver sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute sysdev: Add utility functions for simple int/ulong variable sysdev attributes sysdev: Pass the attribute to the low level sysdev show/store function driver core: Suppress sysfs warnings for device_rename(). kobject: Transmit return value of call_usermodehelper() to caller sysfs-rules.txt: reword API stability statement debugfs: Implement debugfs_remove_recursive() HOWTO: change email addresses of James in HOWTO always enable FW_LOADER unless EMBEDDED=y uio-howto.tmpl: use unique output names uio-howto.tmpl: use standard copyright/legal markings sysfs: don't call notify_change sysdev: fix debugging statements in registration code. kobject: should use kobject_put() in kset-example kobject: reorder kobject to save space on 64 bit builds ...
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/dsp56k.c3
-rw-r--r--drivers/char/ip2/ip2main.c12
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c2
-rw-r--r--drivers/char/istallion.c5
-rw-r--r--drivers/char/lp.c3
-rw-r--r--drivers/char/mem.c6
-rw-r--r--drivers/char/misc.c4
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c2
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c3
-rw-r--r--drivers/char/ppdev.c5
-rw-r--r--drivers/char/raw.c7
-rw-r--r--drivers/char/snsc.c3
-rw-r--r--drivers/char/stallion.c4
-rw-r--r--drivers/char/tty_io.c12
-rw-r--r--drivers/char/vc_screen.c12
-rw-r--r--drivers/char/viotape.c8
-rw-r--r--drivers/char/vt.c14
-rw-r--r--drivers/char/xilinx_hwicap/xilinx_hwicap.c5
18 files changed, 61 insertions, 49 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index b9a30c30e2b8..33c466a4888f 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -500,7 +500,8 @@ static int __init dsp56k_init_driver(void)
500 err = PTR_ERR(dsp56k_class); 500 err = PTR_ERR(dsp56k_class);
501 goto out_chrdev; 501 goto out_chrdev;
502 } 502 }
503 device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), "dsp56k"); 503 device_create_drvdata(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0),
504 NULL, "dsp56k");
504 505
505 printk(banner); 506 printk(banner);
506 goto out; 507 goto out;
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 5dc74404058f..9cb48fcd316c 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -718,12 +718,12 @@ ip2_loadmain(int *iop, int *irqp)
718 } 718 }
719 719
720 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) { 720 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
721 device_create(ip2_class, NULL, 721 device_create_drvdata(ip2_class, NULL,
722 MKDEV(IP2_IPL_MAJOR, 4 * i), 722 MKDEV(IP2_IPL_MAJOR, 4 * i),
723 "ipl%d", i); 723 NULL, "ipl%d", i);
724 device_create(ip2_class, NULL, 724 device_create_drvdata(ip2_class, NULL,
725 MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 725 MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
726 "stat%d", i); 726 NULL, "stat%d", i);
727 727
728 for ( box = 0; box < ABS_MAX_BOXES; ++box ) 728 for ( box = 0; box < ABS_MAX_BOXES; ++box )
729 { 729 {
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index c11a40483459..64e1c169e826 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -871,7 +871,7 @@ static void ipmi_new_smi(int if_num, struct device *device)
871 entry->dev = dev; 871 entry->dev = dev;
872 872
873 mutex_lock(&reg_list_mutex); 873 mutex_lock(&reg_list_mutex);
874 device_create(ipmi_class, device, dev, "ipmi%d", if_num); 874 device_create_drvdata(ipmi_class, device, dev, NULL, "ipmi%d", if_num);
875 list_add(&entry->link, &reg_list); 875 list_add(&entry->link, &reg_list);
876 mutex_unlock(&reg_list_mutex); 876 mutex_unlock(&reg_list_mutex);
877} 877}
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index f9ebcd41d8e5..843a2afaf204 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -4599,8 +4599,9 @@ static int __init istallion_module_init(void)
4599 4599
4600 istallion_class = class_create(THIS_MODULE, "staliomem"); 4600 istallion_class = class_create(THIS_MODULE, "staliomem");
4601 for (i = 0; i < 4; i++) 4601 for (i = 0; i < 4; i++)
4602 device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4602 device_create_drvdata(istallion_class, NULL,
4603 "staliomem%d", i); 4603 MKDEV(STL_SIOMEMMAJOR, i),
4604 NULL, "staliomem%d", i);
4604 4605
4605 return 0; 4606 return 0;
4606err_deinit: 4607err_deinit:
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 71abb4c33aa2..3f2719b9f77b 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -813,7 +813,8 @@ static int lp_register(int nr, struct parport *port)
813 if (reset) 813 if (reset)
814 lp_reset(nr); 814 lp_reset(nr);
815 815
816 device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr); 816 device_create_drvdata(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL,
817 "lp%d", nr);
817 818
818 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 819 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
819 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); 820 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index b6772d657547..c2dba82eb5f7 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -989,9 +989,9 @@ static int __init chr_dev_init(void)
989 989
990 mem_class = class_create(THIS_MODULE, "mem"); 990 mem_class = class_create(THIS_MODULE, "mem");
991 for (i = 0; i < ARRAY_SIZE(devlist); i++) 991 for (i = 0; i < ARRAY_SIZE(devlist); i++)
992 device_create(mem_class, NULL, 992 device_create_drvdata(mem_class, NULL,
993 MKDEV(MEM_MAJOR, devlist[i].minor), 993 MKDEV(MEM_MAJOR, devlist[i].minor),
994 devlist[i].name); 994 NULL, devlist[i].name);
995 995
996 return 0; 996 return 0;
997} 997}
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 6e1563c3d30a..999aa779c08a 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -217,8 +217,8 @@ int misc_register(struct miscdevice * misc)
217 misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); 217 misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
218 dev = MKDEV(MISC_MAJOR, misc->minor); 218 dev = MKDEV(MISC_MAJOR, misc->minor);
219 219
220 misc->this_device = device_create(misc_class, misc->parent, dev, 220 misc->this_device = device_create_drvdata(misc_class, misc->parent,
221 "%s", misc->name); 221 dev, NULL, "%s", misc->name);
222 if (IS_ERR(misc->this_device)) { 222 if (IS_ERR(misc->this_device)) {
223 err = PTR_ERR(misc->this_device); 223 err = PTR_ERR(misc->this_device);
224 goto out; 224 goto out;
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index e4a4fbd37d7a..f070ae7bd91a 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1896,7 +1896,7 @@ static int cm4000_probe(struct pcmcia_device *link)
1896 return ret; 1896 return ret;
1897 } 1897 }
1898 1898
1899 device_create(cmm_class, NULL, MKDEV(major, i), "cmm%d", i); 1899 device_create_drvdata(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
1900 1900
1901 return 0; 1901 return 0;
1902} 1902}
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 6181f8a9b0bd..0b5934bef7a4 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -653,7 +653,8 @@ static int reader_probe(struct pcmcia_device *link)
653 return ret; 653 return ret;
654 } 654 }
655 655
656 device_create(cmx_class, NULL, MKDEV(major, i), "cmx%d", i); 656 device_create_drvdata(cmx_class, NULL, MKDEV(major, i), NULL,
657 "cmx%d", i);
657 658
658 return 0; 659 return 0;
659} 660}
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index f6e6acadd9a0..7af7a7e6b9c2 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -752,8 +752,9 @@ static const struct file_operations pp_fops = {
752 752
753static void pp_attach(struct parport *port) 753static void pp_attach(struct parport *port)
754{ 754{
755 device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number), 755 device_create_drvdata(ppdev_class, port->dev,
756 "parport%d", port->number); 756 MKDEV(PP_MAJOR, port->number),
757 NULL, "parport%d", port->number);
757} 758}
758 759
759static void pp_detach(struct parport *port) 760static void pp_detach(struct parport *port)
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 505fcbe884a4..47b8cf281d4a 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -131,8 +131,8 @@ raw_ioctl(struct inode *inode, struct file *filp,
131static void bind_device(struct raw_config_request *rq) 131static void bind_device(struct raw_config_request *rq)
132{ 132{
133 device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor)); 133 device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
134 device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), 134 device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
135 "raw%d", rq->raw_minor); 135 NULL, "raw%d", rq->raw_minor);
136} 136}
137 137
138/* 138/*
@@ -283,7 +283,8 @@ static int __init raw_init(void)
283 ret = PTR_ERR(raw_class); 283 ret = PTR_ERR(raw_class);
284 goto error_region; 284 goto error_region;
285 } 285 }
286 device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), "rawctl"); 286 device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL,
287 "rawctl");
287 288
288 return 0; 289 return 0;
289 290
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 0b799ac1b049..3ce60df14c0a 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -444,7 +444,8 @@ scdrv_init(void)
444 continue; 444 continue;
445 } 445 }
446 446
447 device_create(snsc_class, NULL, dev, "%s", devname); 447 device_create_drvdata(snsc_class, NULL, dev, NULL,
448 "%s", devname);
448 449
449 ia64_sn_irtr_intr_enable(scd->scd_nasid, 450 ia64_sn_irtr_intr_enable(scd->scd_nasid,
450 0 /*ignored */ , 451 0 /*ignored */ ,
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index de5a725c3cc0..b976248e1072 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -4755,8 +4755,8 @@ static int __init stallion_module_init(void)
4755 if (IS_ERR(stallion_class)) 4755 if (IS_ERR(stallion_class))
4756 printk("STALLION: failed to create class\n"); 4756 printk("STALLION: failed to create class\n");
4757 for (i = 0; i < 4; i++) 4757 for (i = 0; i < 4; i++)
4758 device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4758 device_create_drvdata(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
4759 "staliomem%d", i); 4759 NULL, "staliomem%d", i);
4760 4760
4761 return 0; 4761 return 0;
4762err_unrtty: 4762err_unrtty:
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index d94cd8410c53..15e597d03002 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3412,7 +3412,7 @@ struct device *tty_register_device(struct tty_driver *driver, unsigned index,
3412 else 3412 else
3413 tty_line_name(driver, index, name); 3413 tty_line_name(driver, index, name);
3414 3414
3415 return device_create(tty_class, device, dev, name); 3415 return device_create_drvdata(tty_class, device, dev, NULL, name);
3416} 3416}
3417 3417
3418/** 3418/**
@@ -3690,20 +3690,22 @@ static int __init tty_init(void)
3690 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || 3690 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
3691 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 3691 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
3692 panic("Couldn't register /dev/tty driver\n"); 3692 panic("Couldn't register /dev/tty driver\n");
3693 device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), "tty"); 3693 device_create_drvdata(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL,
3694 "tty");
3694 3695
3695 cdev_init(&console_cdev, &console_fops); 3696 cdev_init(&console_cdev, &console_fops);
3696 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 3697 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
3697 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 3698 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
3698 panic("Couldn't register /dev/console driver\n"); 3699 panic("Couldn't register /dev/console driver\n");
3699 device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), "console"); 3700 device_create_drvdata(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL,
3701 "console");
3700 3702
3701#ifdef CONFIG_UNIX98_PTYS 3703#ifdef CONFIG_UNIX98_PTYS
3702 cdev_init(&ptmx_cdev, &ptmx_fops); 3704 cdev_init(&ptmx_cdev, &ptmx_fops);
3703 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || 3705 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
3704 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 3706 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
3705 panic("Couldn't register /dev/ptmx driver\n"); 3707 panic("Couldn't register /dev/ptmx driver\n");
3706 device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), "ptmx"); 3708 device_create_drvdata(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
3707#endif 3709#endif
3708 3710
3709#ifdef CONFIG_VT 3711#ifdef CONFIG_VT
@@ -3711,7 +3713,7 @@ static int __init tty_init(void)
3711 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || 3713 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
3712 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 3714 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
3713 panic("Couldn't register /dev/tty0 driver\n"); 3715 panic("Couldn't register /dev/tty0 driver\n");
3714 device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0"); 3716 device_create_drvdata(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
3715 3717
3716 vty_init(); 3718 vty_init();
3717#endif 3719#endif
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index eebfad2777d2..c2ae52dd53d1 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -481,10 +481,10 @@ static struct class *vc_class;
481 481
482void vcs_make_sysfs(struct tty_struct *tty) 482void vcs_make_sysfs(struct tty_struct *tty)
483{ 483{
484 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), 484 device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
485 "vcs%u", tty->index + 1); 485 NULL, "vcs%u", tty->index + 1);
486 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), 486 device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
487 "vcsa%u", tty->index + 1); 487 NULL, "vcsa%u", tty->index + 1);
488} 488}
489 489
490void vcs_remove_sysfs(struct tty_struct *tty) 490void vcs_remove_sysfs(struct tty_struct *tty)
@@ -499,7 +499,7 @@ int __init vcs_init(void)
499 panic("unable to get major %d for vcs device", VCS_MAJOR); 499 panic("unable to get major %d for vcs device", VCS_MAJOR);
500 vc_class = class_create(THIS_MODULE, "vc"); 500 vc_class = class_create(THIS_MODULE, "vc");
501 501
502 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), "vcs"); 502 device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
503 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), "vcsa"); 503 device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
504 return 0; 504 return 0;
505} 505}
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index e5da98d8f9cd..7a70a40ad639 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -886,10 +886,10 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
886 state[i].cur_part = 0; 886 state[i].cur_part = 0;
887 for (j = 0; j < MAX_PARTITIONS; ++j) 887 for (j = 0; j < MAX_PARTITIONS; ++j)
888 state[i].part_stat_rwi[j] = VIOT_IDLE; 888 state[i].part_stat_rwi[j] = VIOT_IDLE;
889 device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), 889 device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i),
890 "iseries!vt%d", i); 890 NULL, "iseries!vt%d", i);
891 device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 891 device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
892 "iseries!nvt%d", i); 892 NULL, "iseries!nvt%d", i);
893 printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries " 893 printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
894 "resource %10.10s type %4.4s, model %3.3s\n", 894 "resource %10.10s type %4.4s, model %3.3s\n",
895 i, viotape_unitinfo[i].rsrcname, 895 i, viotape_unitinfo[i].rsrcname,
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 935f1c207a1f..e32a076d5f1f 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -3425,9 +3425,10 @@ int register_con_driver(const struct consw *csw, int first, int last)
3425 if (retval) 3425 if (retval)
3426 goto err; 3426 goto err;
3427 3427
3428 con_driver->dev = device_create(vtconsole_class, NULL, 3428 con_driver->dev = device_create_drvdata(vtconsole_class, NULL,
3429 MKDEV(0, con_driver->node), 3429 MKDEV(0, con_driver->node),
3430 "vtcon%i", con_driver->node); 3430 NULL, "vtcon%i",
3431 con_driver->node);
3431 3432
3432 if (IS_ERR(con_driver->dev)) { 3433 if (IS_ERR(con_driver->dev)) {
3433 printk(KERN_WARNING "Unable to create device for %s; " 3434 printk(KERN_WARNING "Unable to create device for %s; "
@@ -3535,9 +3536,10 @@ static int __init vtconsole_class_init(void)
3535 struct con_driver *con = &registered_con_driver[i]; 3536 struct con_driver *con = &registered_con_driver[i];
3536 3537
3537 if (con->con && !con->dev) { 3538 if (con->con && !con->dev) {
3538 con->dev = device_create(vtconsole_class, NULL, 3539 con->dev = device_create_drvdata(vtconsole_class, NULL,
3539 MKDEV(0, con->node), 3540 MKDEV(0, con->node),
3540 "vtcon%i", con->node); 3541 NULL, "vtcon%i",
3542 con->node);
3541 3543
3542 if (IS_ERR(con->dev)) { 3544 if (IS_ERR(con->dev)) {
3543 printk(KERN_WARNING "Unable to create " 3545 printk(KERN_WARNING "Unable to create "
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index 1e1b81e57cdc..51966ccf4ea3 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -658,8 +658,9 @@ static int __devinit hwicap_setup(struct device *dev, int id,
658 dev_err(dev, "cdev_add() failed\n"); 658 dev_err(dev, "cdev_add() failed\n");
659 goto failed3; 659 goto failed3;
660 } 660 }
661 /* devfs_mk_cdev(devt, S_IFCHR|S_IRUGO|S_IWUGO, DRIVER_NAME); */ 661
662 device_create(icap_class, dev, devt, "%s%d", DRIVER_NAME, id); 662 device_create_drvdata(icap_class, dev, devt, NULL,
663 "%s%d", DRIVER_NAME, id);
663 return 0; /* success */ 664 return 0; /* success */
664 665
665 failed3: 666 failed3: