diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 23:03:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-16 12:24:42 -0400 |
commit | 03457cd455d042c9ee4cc47c1ed4532257980693 (patch) | |
tree | de926d3e839d363f3414c06906a56d601f224e78 /drivers | |
parent | 1ff9f542e5f87c299226557ce5e67a402ed4b502 (diff) |
device create: char: convert device_create_drvdata to device_create
Now that device_create() has been audited, rename things back to the
original call to be sane.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/bsr.c | 5 | ||||
-rw-r--r-- | drivers/char/dsp56k.c | 4 | ||||
-rw-r--r-- | drivers/char/ip2/ip2main.c | 12 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 2 | ||||
-rw-r--r-- | drivers/char/istallion.c | 5 | ||||
-rw-r--r-- | drivers/char/lp.c | 4 | ||||
-rw-r--r-- | drivers/char/mem.c | 6 | ||||
-rw-r--r-- | drivers/char/misc.c | 4 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 2 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 3 | ||||
-rw-r--r-- | drivers/char/ppdev.c | 5 | ||||
-rw-r--r-- | drivers/char/raw.c | 7 | ||||
-rw-r--r-- | drivers/char/snsc.c | 4 | ||||
-rw-r--r-- | drivers/char/stallion.c | 4 | ||||
-rw-r--r-- | drivers/char/tty_io.c | 2 | ||||
-rw-r--r-- | drivers/char/vc_screen.c | 12 | ||||
-rw-r--r-- | drivers/char/viotape.c | 8 | ||||
-rw-r--r-- | drivers/char/xilinx_hwicap/xilinx_hwicap.c | 3 |
18 files changed, 43 insertions, 49 deletions
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index b650b4e48e50..456f54db73e2 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c | |||
@@ -229,9 +229,8 @@ static int bsr_create_devs(struct device_node *bn) | |||
229 | if (result) | 229 | if (result) |
230 | goto out_err; | 230 | goto out_err; |
231 | 231 | ||
232 | cur->bsr_device = device_create_drvdata(bsr_class, NULL, | 232 | cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev, |
233 | cur->bsr_dev, | 233 | cur, cur->bsr_name); |
234 | cur, cur->bsr_name); | ||
235 | if (!cur->bsr_device) { | 234 | if (!cur->bsr_device) { |
236 | printk(KERN_ERR "device_create failed for %s\n", | 235 | printk(KERN_ERR "device_create failed for %s\n", |
237 | cur->bsr_name); | 236 | cur->bsr_name); |
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index ca7c72a486b2..85832ab924e6 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c | |||
@@ -508,8 +508,8 @@ static int __init dsp56k_init_driver(void) | |||
508 | err = PTR_ERR(dsp56k_class); | 508 | err = PTR_ERR(dsp56k_class); |
509 | goto out_chrdev; | 509 | goto out_chrdev; |
510 | } | 510 | } |
511 | device_create_drvdata(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), | 511 | device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, |
512 | NULL, "dsp56k"); | 512 | "dsp56k"); |
513 | 513 | ||
514 | printk(banner); | 514 | printk(banner); |
515 | goto out; | 515 | goto out; |
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 6774572d3759..70e0ebc30bd0 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -745,12 +745,12 @@ static int __init ip2_loadmain(void) | |||
745 | 745 | ||
746 | pB = i2BoardPtrTable[i]; | 746 | pB = i2BoardPtrTable[i]; |
747 | if (pB != NULL) { | 747 | if (pB != NULL) { |
748 | device_create_drvdata(ip2_class, NULL, | 748 | device_create(ip2_class, NULL, |
749 | MKDEV(IP2_IPL_MAJOR, 4 * i), | 749 | MKDEV(IP2_IPL_MAJOR, 4 * i), |
750 | NULL, "ipl%d", i); | 750 | NULL, "ipl%d", i); |
751 | device_create_drvdata(ip2_class, NULL, | 751 | device_create(ip2_class, NULL, |
752 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1), | 752 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1), |
753 | NULL, "stat%d", i); | 753 | NULL, "stat%d", i); |
754 | 754 | ||
755 | for (box = 0; box < ABS_MAX_BOXES; box++) | 755 | for (box = 0; box < ABS_MAX_BOXES; box++) |
756 | for (j = 0; j < ABS_BIGGEST_BOX; j++) | 756 | for (j = 0; j < ABS_BIGGEST_BOX; j++) |
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index 64e1c169e826..835a33c8d5f5 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(®_list_mutex); | 873 | mutex_lock(®_list_mutex); |
874 | device_create_drvdata(ipmi_class, device, dev, NULL, "ipmi%d", if_num); | 874 | device_create(ipmi_class, device, dev, NULL, "ipmi%d", if_num); |
875 | list_add(&entry->link, ®_list); | 875 | list_add(&entry->link, ®_list); |
876 | mutex_unlock(®_list_mutex); | 876 | mutex_unlock(®_list_mutex); |
877 | } | 877 | } |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 505d7a1f6b8c..44e5d60f517e 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -4600,9 +4600,8 @@ static int __init istallion_module_init(void) | |||
4600 | 4600 | ||
4601 | istallion_class = class_create(THIS_MODULE, "staliomem"); | 4601 | istallion_class = class_create(THIS_MODULE, "staliomem"); |
4602 | for (i = 0; i < 4; i++) | 4602 | for (i = 0; i < 4; i++) |
4603 | device_create_drvdata(istallion_class, NULL, | 4603 | device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), |
4604 | MKDEV(STL_SIOMEMMAJOR, i), | 4604 | NULL, "staliomem%d", i); |
4605 | NULL, "staliomem%d", i); | ||
4606 | 4605 | ||
4607 | return 0; | 4606 | return 0; |
4608 | err_deinit: | 4607 | err_deinit: |
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 3f2719b9f77b..e444c2dba160 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -813,8 +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_drvdata(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL, | 816 | device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL, |
817 | "lp%d", nr); | 817 | "lp%d", nr); |
818 | 818 | ||
819 | 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, |
820 | (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 672b08e694d0..6431f6921a67 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -992,9 +992,9 @@ static int __init chr_dev_init(void) | |||
992 | 992 | ||
993 | mem_class = class_create(THIS_MODULE, "mem"); | 993 | mem_class = class_create(THIS_MODULE, "mem"); |
994 | for (i = 0; i < ARRAY_SIZE(devlist); i++) | 994 | for (i = 0; i < ARRAY_SIZE(devlist); i++) |
995 | device_create_drvdata(mem_class, NULL, | 995 | device_create(mem_class, NULL, |
996 | MKDEV(MEM_MAJOR, devlist[i].minor), | 996 | MKDEV(MEM_MAJOR, devlist[i].minor), NULL, |
997 | NULL, devlist[i].name); | 997 | devlist[i].name); |
998 | 998 | ||
999 | return 0; | 999 | return 0; |
1000 | } | 1000 | } |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 999aa779c08a..a5e0db9d7662 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_drvdata(misc_class, misc->parent, | 220 | misc->this_device = device_create(misc_class, misc->parent, dev, NULL, |
221 | dev, NULL, "%s", misc->name); | 221 | "%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 1c5bf99895ed..dbb912574569 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -1871,7 +1871,7 @@ static int cm4000_probe(struct pcmcia_device *link) | |||
1871 | return ret; | 1871 | return ret; |
1872 | } | 1872 | } |
1873 | 1873 | ||
1874 | device_create_drvdata(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i); | 1874 | device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i); |
1875 | 1875 | ||
1876 | return 0; | 1876 | return 0; |
1877 | } | 1877 | } |
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 2d7c906435b7..4f0723b07974 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -637,8 +637,7 @@ static int reader_probe(struct pcmcia_device *link) | |||
637 | return ret; | 637 | return ret; |
638 | } | 638 | } |
639 | 639 | ||
640 | device_create_drvdata(cmx_class, NULL, MKDEV(major, i), NULL, | 640 | device_create(cmx_class, NULL, MKDEV(major, i), NULL, "cmx%d", i); |
641 | "cmx%d", i); | ||
642 | 641 | ||
643 | return 0; | 642 | return 0; |
644 | } | 643 | } |
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index bee39fdfba73..c84c34fb1231 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c | |||
@@ -760,9 +760,8 @@ static const struct file_operations pp_fops = { | |||
760 | 760 | ||
761 | static void pp_attach(struct parport *port) | 761 | static void pp_attach(struct parport *port) |
762 | { | 762 | { |
763 | device_create_drvdata(ppdev_class, port->dev, | 763 | device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number), |
764 | MKDEV(PP_MAJOR, port->number), | 764 | NULL, "parport%d", port->number); |
765 | NULL, "parport%d", port->number); | ||
766 | } | 765 | } |
767 | 766 | ||
768 | static void pp_detach(struct parport *port) | 767 | static void pp_detach(struct parport *port) |
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 47b8cf281d4a..e139372d0e69 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -131,8 +131,8 @@ raw_ioctl(struct inode *inode, struct file *filp, | |||
131 | static void bind_device(struct raw_config_request *rq) | 131 | static 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_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), | 134 | device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), NULL, |
135 | NULL, "raw%d", rq->raw_minor); | 135 | "raw%d", rq->raw_minor); |
136 | } | 136 | } |
137 | 137 | ||
138 | /* | 138 | /* |
@@ -283,8 +283,7 @@ 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_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, | 286 | device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); |
287 | "rawctl"); | ||
288 | 287 | ||
289 | return 0; | 288 | return 0; |
290 | 289 | ||
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c index 3ce60df14c0a..32b74de18f5f 100644 --- a/drivers/char/snsc.c +++ b/drivers/char/snsc.c | |||
@@ -444,8 +444,8 @@ scdrv_init(void) | |||
444 | continue; | 444 | continue; |
445 | } | 445 | } |
446 | 446 | ||
447 | device_create_drvdata(snsc_class, NULL, dev, NULL, | 447 | device_create(snsc_class, NULL, dev, NULL, |
448 | "%s", devname); | 448 | "%s", devname); |
449 | 449 | ||
450 | ia64_sn_irtr_intr_enable(scd->scd_nasid, | 450 | ia64_sn_irtr_intr_enable(scd->scd_nasid, |
451 | 0 /*ignored */ , | 451 | 0 /*ignored */ , |
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 8b8f07a7f505..963b03fb29e5 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -4743,8 +4743,8 @@ static int __init stallion_module_init(void) | |||
4743 | if (IS_ERR(stallion_class)) | 4743 | if (IS_ERR(stallion_class)) |
4744 | printk("STALLION: failed to create class\n"); | 4744 | printk("STALLION: failed to create class\n"); |
4745 | for (i = 0; i < 4; i++) | 4745 | for (i = 0; i < 4; i++) |
4746 | device_create_drvdata(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), | 4746 | device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), |
4747 | NULL, "staliomem%d", i); | 4747 | NULL, "staliomem%d", i); |
4748 | 4748 | ||
4749 | return 0; | 4749 | return 0; |
4750 | err_unrtty: | 4750 | err_unrtty: |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 3f48d88cffc0..59f472143f08 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -2850,7 +2850,7 @@ struct device *tty_register_device(struct tty_driver *driver, unsigned index, | |||
2850 | else | 2850 | else |
2851 | tty_line_name(driver, index, name); | 2851 | tty_line_name(driver, index, name); |
2852 | 2852 | ||
2853 | return device_create_drvdata(tty_class, device, dev, NULL, name); | 2853 | return device_create(tty_class, device, dev, NULL, name); |
2854 | } | 2854 | } |
2855 | EXPORT_SYMBOL(tty_register_device); | 2855 | EXPORT_SYMBOL(tty_register_device); |
2856 | 2856 | ||
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index c2ae52dd53d1..4f3b3f95fc42 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
@@ -481,10 +481,10 @@ static struct class *vc_class; | |||
481 | 481 | ||
482 | void vcs_make_sysfs(struct tty_struct *tty) | 482 | void vcs_make_sysfs(struct tty_struct *tty) |
483 | { | 483 | { |
484 | device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), | 484 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), NULL, |
485 | NULL, "vcs%u", tty->index + 1); | 485 | "vcs%u", tty->index + 1); |
486 | device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), | 486 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), NULL, |
487 | NULL, "vcsa%u", tty->index + 1); | 487 | "vcsa%u", tty->index + 1); |
488 | } | 488 | } |
489 | 489 | ||
490 | void vcs_remove_sysfs(struct tty_struct *tty) | 490 | void 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_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); | 502 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); |
503 | device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); | 503 | device_create(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 7a70a40ad639..ffc9254f7e02 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_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), | 889 | device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL, |
890 | NULL, "iseries!vt%d", i); | 890 | "iseries!vt%d", i); |
891 | device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), | 891 | device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), NULL, |
892 | NULL, "iseries!nvt%d", i); | 892 | "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/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 278c9857bcf5..ed132fe55d3d 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c | |||
@@ -657,8 +657,7 @@ static int __devinit hwicap_setup(struct device *dev, int id, | |||
657 | goto failed3; | 657 | goto failed3; |
658 | } | 658 | } |
659 | 659 | ||
660 | device_create_drvdata(icap_class, dev, devt, NULL, | 660 | device_create(icap_class, dev, devt, NULL, "%s%d", DRIVER_NAME, id); |
661 | "%s%d", DRIVER_NAME, id); | ||
662 | return 0; /* success */ | 661 | return 0; /* success */ |
663 | 662 | ||
664 | failed3: | 663 | failed3: |