Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+43 -49
+2 -3
drivers/char/bsr.c
··· 229 229 if (result) 230 230 goto out_err; 231 231 232 - cur->bsr_device = device_create_drvdata(bsr_class, NULL, 233 - cur->bsr_dev, 234 - cur, cur->bsr_name); 232 + cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev, 233 + cur, cur->bsr_name); 235 234 if (!cur->bsr_device) { 236 235 printk(KERN_ERR "device_create failed for %s\n", 237 236 cur->bsr_name);
+2 -2
drivers/char/dsp56k.c
··· 508 508 err = PTR_ERR(dsp56k_class); 509 509 goto out_chrdev; 510 510 } 511 - device_create_drvdata(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), 512 - NULL, "dsp56k"); 511 + device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, 512 + "dsp56k"); 513 513 514 514 printk(banner); 515 515 goto out;
+6 -6
drivers/char/ip2/ip2main.c
··· 745 745 746 746 pB = i2BoardPtrTable[i]; 747 747 if (pB != NULL) { 748 - device_create_drvdata(ip2_class, NULL, 749 - MKDEV(IP2_IPL_MAJOR, 4 * i), 750 - NULL, "ipl%d", i); 751 - device_create_drvdata(ip2_class, NULL, 752 - MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 753 - NULL, "stat%d", i); 748 + device_create(ip2_class, NULL, 749 + MKDEV(IP2_IPL_MAJOR, 4 * i), 750 + NULL, "ipl%d", i); 751 + device_create(ip2_class, NULL, 752 + MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 753 + NULL, "stat%d", i); 754 754 755 755 for (box = 0; box < ABS_MAX_BOXES; box++) 756 756 for (j = 0; j < ABS_BIGGEST_BOX; j++)
+1 -1
drivers/char/ipmi/ipmi_devintf.c
··· 871 871 entry->dev = dev; 872 872 873 873 mutex_lock(&reg_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 875 list_add(&entry->link, &reg_list); 876 876 mutex_unlock(&reg_list_mutex); 877 877 }
+2 -3
drivers/char/istallion.c
··· 4600 4600 4601 4601 istallion_class = class_create(THIS_MODULE, "staliomem"); 4602 4602 for (i = 0; i < 4; i++) 4603 - device_create_drvdata(istallion_class, NULL, 4604 - MKDEV(STL_SIOMEMMAJOR, i), 4605 - NULL, "staliomem%d", i); 4603 + device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4604 + NULL, "staliomem%d", i); 4606 4605 4607 4606 return 0; 4608 4607 err_deinit:
+2 -2
drivers/char/lp.c
··· 813 813 if (reset) 814 814 lp_reset(nr); 815 815 816 - device_create_drvdata(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL, 817 - "lp%d", nr); 816 + device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL, 817 + "lp%d", nr); 818 818 819 819 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 820 820 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
+3 -3
drivers/char/mem.c
··· 992 992 993 993 mem_class = class_create(THIS_MODULE, "mem"); 994 994 for (i = 0; i < ARRAY_SIZE(devlist); i++) 995 - device_create_drvdata(mem_class, NULL, 996 - MKDEV(MEM_MAJOR, devlist[i].minor), 997 - NULL, devlist[i].name); 995 + device_create(mem_class, NULL, 996 + MKDEV(MEM_MAJOR, devlist[i].minor), NULL, 997 + devlist[i].name); 998 998 999 999 return 0; 1000 1000 }
+2 -2
drivers/char/misc.c
··· 217 217 misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); 218 218 dev = MKDEV(MISC_MAJOR, misc->minor); 219 219 220 - misc->this_device = device_create_drvdata(misc_class, misc->parent, 221 - dev, NULL, "%s", misc->name); 220 + misc->this_device = device_create(misc_class, misc->parent, dev, NULL, 221 + "%s", misc->name); 222 222 if (IS_ERR(misc->this_device)) { 223 223 err = PTR_ERR(misc->this_device); 224 224 goto out;
+1 -1
drivers/char/pcmcia/cm4000_cs.c
··· 1871 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 1876 return 0; 1877 1877 }
+1 -2
drivers/char/pcmcia/cm4040_cs.c
··· 637 637 return ret; 638 638 } 639 639 640 - device_create_drvdata(cmx_class, NULL, MKDEV(major, i), NULL, 641 - "cmx%d", i); 640 + device_create(cmx_class, NULL, MKDEV(major, i), NULL, "cmx%d", i); 642 641 643 642 return 0; 644 643 }
+2 -3
drivers/char/ppdev.c
··· 760 760 761 761 static void pp_attach(struct parport *port) 762 762 { 763 - device_create_drvdata(ppdev_class, port->dev, 764 - MKDEV(PP_MAJOR, port->number), 765 - NULL, "parport%d", port->number); 763 + device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number), 764 + NULL, "parport%d", port->number); 766 765 } 767 766 768 767 static void pp_detach(struct parport *port)
+3 -4
drivers/char/raw.c
··· 131 131 static void bind_device(struct raw_config_request *rq) 132 132 { 133 133 device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor)); 134 - device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), 135 - NULL, "raw%d", rq->raw_minor); 134 + device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), NULL, 135 + "raw%d", rq->raw_minor); 136 136 } 137 137 138 138 /* ··· 283 283 ret = PTR_ERR(raw_class); 284 284 goto error_region; 285 285 } 286 - device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, 287 - "rawctl"); 286 + device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); 288 287 289 288 return 0; 290 289
+2 -2
drivers/char/snsc.c
··· 444 444 continue; 445 445 } 446 446 447 - device_create_drvdata(snsc_class, NULL, dev, NULL, 448 - "%s", devname); 447 + device_create(snsc_class, NULL, dev, NULL, 448 + "%s", devname); 449 449 450 450 ia64_sn_irtr_intr_enable(scd->scd_nasid, 451 451 0 /*ignored */ ,
+2 -2
drivers/char/stallion.c
··· 4743 4743 if (IS_ERR(stallion_class)) 4744 4744 printk("STALLION: failed to create class\n"); 4745 4745 for (i = 0; i < 4; i++) 4746 - device_create_drvdata(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4747 - NULL, "staliomem%d", i); 4746 + device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4747 + NULL, "staliomem%d", i); 4748 4748 4749 4749 return 0; 4750 4750 err_unrtty:
+1 -1
drivers/char/tty_io.c
··· 2850 2850 else 2851 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 2855 EXPORT_SYMBOL(tty_register_device); 2856 2856
+6 -6
drivers/char/vc_screen.c
··· 481 481 482 482 void vcs_make_sysfs(struct tty_struct *tty) 483 483 { 484 - device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), 485 - NULL, "vcs%u", tty->index + 1); 486 - device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), 487 - NULL, "vcsa%u", tty->index + 1); 484 + device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), NULL, 485 + "vcs%u", tty->index + 1); 486 + device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), NULL, 487 + "vcsa%u", tty->index + 1); 488 488 } 489 489 490 490 void vcs_remove_sysfs(struct tty_struct *tty) ··· 499 499 panic("unable to get major %d for vcs device", VCS_MAJOR); 500 500 vc_class = class_create(THIS_MODULE, "vc"); 501 501 502 - device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); 503 - device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); 502 + device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); 503 + device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); 504 504 return 0; 505 505 }
+4 -4
drivers/char/viotape.c
··· 886 886 state[i].cur_part = 0; 887 887 for (j = 0; j < MAX_PARTITIONS; ++j) 888 888 state[i].part_stat_rwi[j] = VIOT_IDLE; 889 - device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), 890 - NULL, "iseries!vt%d", i); 891 - device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 892 - NULL, "iseries!nvt%d", i); 889 + device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL, 890 + "iseries!vt%d", i); 891 + device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), NULL, 892 + "iseries!nvt%d", i); 893 893 printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries " 894 894 "resource %10.10s type %4.4s, model %3.3s\n", 895 895 i, viotape_unitinfo[i].rsrcname,
+1 -2
drivers/char/xilinx_hwicap/xilinx_hwicap.c
··· 657 657 goto failed3; 658 658 } 659 659 660 - device_create_drvdata(icap_class, dev, devt, NULL, 661 - "%s%d", DRIVER_NAME, id); 660 + device_create(icap_class, dev, devt, NULL, "%s%d", DRIVER_NAME, id); 662 661 return 0; /* success */ 663 662 664 663 failed3: