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

Convert from class_device to device in drivers/char

Convert from class_device to device in drivers/char.

Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


authored by

tonyj@suse.de and committed by
Greg Kroah-Hartman
07c015e7 60043428

+32 -39
+2 -2
drivers/char/dsp56k.c
··· 513 513 err = PTR_ERR(dsp56k_class); 514 514 goto out_chrdev; 515 515 } 516 - class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); 516 + device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), "dsp56k"); 517 517 518 518 printk(banner); 519 519 goto out; ··· 527 527 528 528 static void __exit dsp56k_cleanup_driver(void) 529 529 { 530 - class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); 530 + device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); 531 531 class_destroy(dsp56k_class); 532 532 unregister_chrdev(DSP56K_MAJOR, "dsp56k"); 533 533 }
+6 -6
drivers/char/ip2/ip2main.c
··· 411 411 iiResetDelay( i2BoardPtrTable[i] ); 412 412 /* free io addresses and Tibet */ 413 413 release_region( ip2config.addr[i], 8 ); 414 - class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); 415 - class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); 414 + device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); 415 + device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); 416 416 } 417 417 /* Disable and remove interrupt handler. */ 418 418 if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { ··· 718 718 } 719 719 720 720 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) { 721 - class_device_create(ip2_class, NULL, 721 + device_create(ip2_class, NULL, 722 722 MKDEV(IP2_IPL_MAJOR, 4 * i), 723 - NULL, "ipl%d", i); 724 - class_device_create(ip2_class, NULL, 723 + "ipl%d", i); 724 + device_create(ip2_class, NULL, 725 725 MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 726 - NULL, "stat%d", i); 726 + "stat%d", i); 727 727 728 728 for ( box = 0; box < ABS_MAX_BOXES; ++box ) 729 729 {
+3 -3
drivers/char/ipmi/ipmi_devintf.c
··· 865 865 entry->dev = dev; 866 866 867 867 mutex_lock(&reg_list_mutex); 868 - class_device_create(ipmi_class, NULL, dev, device, "ipmi%d", if_num); 868 + device_create(ipmi_class, device, dev, "ipmi%d", if_num); 869 869 list_add(&entry->link, &reg_list); 870 870 mutex_unlock(&reg_list_mutex); 871 871 } ··· 883 883 break; 884 884 } 885 885 } 886 - class_device_destroy(ipmi_class, dev); 886 + device_destroy(ipmi_class, dev); 887 887 mutex_unlock(&reg_list_mutex); 888 888 } 889 889 ··· 938 938 mutex_lock(&reg_list_mutex); 939 939 list_for_each_entry_safe(entry, entry2, &reg_list, link) { 940 940 list_del(&entry->link); 941 - class_device_destroy(ipmi_class, entry->dev); 941 + device_destroy(ipmi_class, entry->dev); 942 942 kfree(entry); 943 943 } 944 944 mutex_unlock(&reg_list_mutex);
+3 -5
drivers/char/istallion.c
··· 4624 4624 4625 4625 istallion_class = class_create(THIS_MODULE, "staliomem"); 4626 4626 for (i = 0; i < 4; i++) 4627 - class_device_create(istallion_class, NULL, 4628 - MKDEV(STL_SIOMEMMAJOR, i), 4629 - NULL, "staliomem%d", i); 4627 + device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4628 + "staliomem%d", i); 4630 4629 4631 4630 return 0; 4632 4631 err_deinit: ··· 4658 4659 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"); 4659 4660 4660 4661 for (j = 0; j < 4; j++) 4661 - class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, 4662 - j)); 4662 + device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, j)); 4663 4663 class_destroy(istallion_class); 4664 4664 4665 4665 pci_unregister_driver(&stli_pcidriver);
+2 -3
drivers/char/lp.c
··· 799 799 if (reset) 800 800 lp_reset(nr); 801 801 802 - class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), port->dev, 803 - "lp%d", nr); 802 + device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr); 804 803 805 804 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 806 805 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); ··· 970 971 if (lp_table[offset].dev == NULL) 971 972 continue; 972 973 parport_unregister_device(lp_table[offset].dev); 973 - class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); 974 + device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); 974 975 } 975 976 class_destroy(lp_class); 976 977 }
+2 -3
drivers/char/pcmcia/cm4000_cs.c
··· 1863 1863 return ret; 1864 1864 } 1865 1865 1866 - class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, 1867 - "cmm%d", i); 1866 + device_create(cmm_class, NULL, MKDEV(major, i), "cmm%d", i); 1868 1867 1869 1868 return 0; 1870 1869 } ··· 1887 1888 dev_table[devno] = NULL; 1888 1889 kfree(dev); 1889 1890 1890 - class_device_destroy(cmm_class, MKDEV(major, devno)); 1891 + device_destroy(cmm_class, MKDEV(major, devno)); 1891 1892 1892 1893 return; 1893 1894 }
+2 -3
drivers/char/pcmcia/cm4040_cs.c
··· 642 642 return ret; 643 643 } 644 644 645 - class_device_create(cmx_class, NULL, MKDEV(major, i), NULL, 646 - "cmx%d", i); 645 + device_create(cmx_class, NULL, MKDEV(major, i), "cmx%d", i); 647 646 648 647 return 0; 649 648 } ··· 665 666 dev_table[devno] = NULL; 666 667 kfree(dev); 667 668 668 - class_device_destroy(cmx_class, MKDEV(major, devno)); 669 + device_destroy(cmx_class, MKDEV(major, devno)); 669 670 670 671 return; 671 672 }
+1 -2
drivers/char/snsc.c
··· 441 441 continue; 442 442 } 443 443 444 - class_device_create(snsc_class, NULL, dev, NULL, 445 - "%s", devname); 444 + device_create(snsc_class, NULL, dev, "%s", devname); 446 445 447 446 ia64_sn_irtr_intr_enable(scd->scd_nasid, 448 447 0 /*ignored */ ,
+3 -4
drivers/char/stallion.c
··· 4778 4778 if (IS_ERR(stallion_class)) 4779 4779 printk("STALLION: failed to create class\n"); 4780 4780 for (i = 0; i < 4; i++) 4781 - class_device_create(stallion_class, NULL, 4782 - MKDEV(STL_SIOMEMMAJOR, i), NULL, 4783 - "staliomem%d", i); 4781 + device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), 4782 + "staliomem%d", i); 4784 4783 4785 4784 return 0; 4786 4785 err_unrtty: ··· 4815 4816 } 4816 4817 4817 4818 for (i = 0; i < 4; i++) 4818 - class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); 4819 + device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); 4819 4820 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"); 4820 4821 class_destroy(stallion_class); 4821 4822
+3 -3
drivers/char/tipar.c
··· 441 441 goto out; 442 442 } 443 443 444 - class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, 445 - TIPAR_MINOR + nr), port->dev, "par%d", nr); 444 + device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR, 445 + TIPAR_MINOR + nr), "par%d", nr); 446 446 447 447 /* Display informations */ 448 448 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == ··· 534 534 if (table[i].dev == NULL) 535 535 continue; 536 536 parport_unregister_device(table[i].dev); 537 - class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); 537 + device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); 538 538 } 539 539 class_destroy(tipar_class); 540 540
+5 -5
drivers/char/viotape.c
··· 871 871 state[i].cur_part = 0; 872 872 for (j = 0; j < MAX_PARTITIONS; ++j) 873 873 state[i].part_stat_rwi[j] = VIOT_IDLE; 874 - class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL, 874 + device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), 875 875 "iseries!vt%d", i); 876 - class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 877 - NULL, "iseries!nvt%d", i); 876 + device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 877 + "iseries!nvt%d", i); 878 878 printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries " 879 879 "resource %10.10s type %4.4s, model %3.3s\n", 880 880 i, viotape_unitinfo[i].rsrcname, ··· 886 886 { 887 887 int i = vdev->unit_address; 888 888 889 - class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); 890 - class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); 889 + device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); 890 + device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); 891 891 return 0; 892 892 } 893 893