aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authortonyj@suse.de <tonyj@suse.de>2007-08-08 01:28:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:04 -0400
commit07c015e7654821f2dda00dcf152c65b2afd46ac3 (patch)
treeb3dde3f71ab3a36c0a2b438b58a57e08cbcb06d8 /drivers
parent60043428a561a5d431ad479b7ecb79805ed04efc (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/dsp56k.c4
-rw-r--r--drivers/char/ip2/ip2main.c12
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c6
-rw-r--r--drivers/char/istallion.c8
-rw-r--r--drivers/char/lp.c5
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c5
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c5
-rw-r--r--drivers/char/snsc.c3
-rw-r--r--drivers/char/stallion.c7
-rw-r--r--drivers/char/tipar.c6
-rw-r--r--drivers/char/viotape.c10
11 files changed, 32 insertions, 39 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index 9b8278e1f4f8..acbfe1c49b4d 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -513,7 +513,7 @@ static int __init dsp56k_init_driver(void)
513 err = PTR_ERR(dsp56k_class); 513 err = PTR_ERR(dsp56k_class);
514 goto out_chrdev; 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 printk(banner); 518 printk(banner);
519 goto out; 519 goto out;
@@ -527,7 +527,7 @@ module_init(dsp56k_init_driver);
527 527
528static void __exit dsp56k_cleanup_driver(void) 528static 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 class_destroy(dsp56k_class); 531 class_destroy(dsp56k_class);
532 unregister_chrdev(DSP56K_MAJOR, "dsp56k"); 532 unregister_chrdev(DSP56K_MAJOR, "dsp56k");
533} 533}
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 8d74b8745e60..bd94d5f9e62b 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -411,8 +411,8 @@ cleanup_module(void)
411 iiResetDelay( i2BoardPtrTable[i] ); 411 iiResetDelay( i2BoardPtrTable[i] );
412 /* free io addresses and Tibet */ 412 /* free io addresses and Tibet */
413 release_region( ip2config.addr[i], 8 ); 413 release_region( ip2config.addr[i], 8 );
414 class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); 414 device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i));
415 class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); 415 device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
416 } 416 }
417 /* Disable and remove interrupt handler. */ 417 /* Disable and remove interrupt handler. */
418 if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { 418 if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) {
@@ -718,12 +718,12 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
718 } 718 }
719 719
720 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) { 720 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
721 class_device_create(ip2_class, NULL, 721 device_create(ip2_class, NULL,
722 MKDEV(IP2_IPL_MAJOR, 4 * i), 722 MKDEV(IP2_IPL_MAJOR, 4 * i),
723 NULL, "ipl%d", i); 723 "ipl%d", i);
724 class_device_create(ip2_class, NULL, 724 device_create(ip2_class, NULL,
725 MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 725 MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
726 NULL, "stat%d", i); 726 "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 c2aa44ee6eb6..0246a2b8ce48 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -865,7 +865,7 @@ static void ipmi_new_smi(int if_num, struct device *device)
865 entry->dev = dev; 865 entry->dev = dev;
866 866
867 mutex_lock(&reg_list_mutex); 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 list_add(&entry->link, &reg_list); 869 list_add(&entry->link, &reg_list);
870 mutex_unlock(&reg_list_mutex); 870 mutex_unlock(&reg_list_mutex);
871} 871}
@@ -883,7 +883,7 @@ static void ipmi_smi_gone(int if_num)
883 break; 883 break;
884 } 884 }
885 } 885 }
886 class_device_destroy(ipmi_class, dev); 886 device_destroy(ipmi_class, dev);
887 mutex_unlock(&reg_list_mutex); 887 mutex_unlock(&reg_list_mutex);
888} 888}
889 889
@@ -938,7 +938,7 @@ static __exit void cleanup_ipmi(void)
938 mutex_lock(&reg_list_mutex); 938 mutex_lock(&reg_list_mutex);
939 list_for_each_entry_safe(entry, entry2, &reg_list, link) { 939 list_for_each_entry_safe(entry, entry2, &reg_list, link) {
940 list_del(&entry->link); 940 list_del(&entry->link);
941 class_device_destroy(ipmi_class, entry->dev); 941 device_destroy(ipmi_class, entry->dev);
942 kfree(entry); 942 kfree(entry);
943 } 943 }
944 mutex_unlock(&reg_list_mutex); 944 mutex_unlock(&reg_list_mutex);
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 3c66f402f9d7..1f27be1ec3d4 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -4624,9 +4624,8 @@ static int __init istallion_module_init(void)
4624 4624
4625 istallion_class = class_create(THIS_MODULE, "staliomem"); 4625 istallion_class = class_create(THIS_MODULE, "staliomem");
4626 for (i = 0; i < 4; i++) 4626 for (i = 0; i < 4; i++)
4627 class_device_create(istallion_class, NULL, 4627 device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
4628 MKDEV(STL_SIOMEMMAJOR, i), 4628 "staliomem%d", i);
4629 NULL, "staliomem%d", i);
4630 4629
4631 return 0; 4630 return 0;
4632err_deinit: 4631err_deinit:
@@ -4659,8 +4658,7 @@ static void __exit istallion_module_exit(void)
4659 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"); 4658 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
4660 4659
4661 for (j = 0; j < 4; j++) 4660 for (j = 0; j < 4; j++)
4662 class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, 4661 device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, j));
4663 j));
4664 class_destroy(istallion_class); 4662 class_destroy(istallion_class);
4665 4663
4666 pci_unregister_driver(&stli_pcidriver); 4664 pci_unregister_driver(&stli_pcidriver);
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 62051f8b0910..c59e2a0996cc 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -799,8 +799,7 @@ static int lp_register(int nr, struct parport *port)
799 if (reset) 799 if (reset)
800 lp_reset(nr); 800 lp_reset(nr);
801 801
802 class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), port->dev, 802 device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr);
803 "lp%d", nr);
804 803
805 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 804 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
806 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); 805 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
@@ -971,7 +970,7 @@ static void lp_cleanup_module (void)
971 if (lp_table[offset].dev == NULL) 970 if (lp_table[offset].dev == NULL)
972 continue; 971 continue;
973 parport_unregister_device(lp_table[offset].dev); 972 parport_unregister_device(lp_table[offset].dev);
974 class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); 973 device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
975 } 974 }
976 class_destroy(lp_class); 975 class_destroy(lp_class);
977} 976}
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 4177f6db83e9..cc5d77797def 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1863,8 +1863,7 @@ static int cm4000_probe(struct pcmcia_device *link)
1863 return ret; 1863 return ret;
1864 } 1864 }
1865 1865
1866 class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, 1866 device_create(cmm_class, NULL, MKDEV(major, i), "cmm%d", i);
1867 "cmm%d", i);
1868 1867
1869 return 0; 1868 return 0;
1870} 1869}
@@ -1888,7 +1887,7 @@ static void cm4000_detach(struct pcmcia_device *link)
1888 dev_table[devno] = NULL; 1887 dev_table[devno] = NULL;
1889 kfree(dev); 1888 kfree(dev);
1890 1889
1891 class_device_destroy(cmm_class, MKDEV(major, devno)); 1890 device_destroy(cmm_class, MKDEV(major, devno));
1892 1891
1893 return; 1892 return;
1894} 1893}
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index b24a3e7bbb9f..a0b9c8728d56 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -642,8 +642,7 @@ static int reader_probe(struct pcmcia_device *link)
642 return ret; 642 return ret;
643 } 643 }
644 644
645 class_device_create(cmx_class, NULL, MKDEV(major, i), NULL, 645 device_create(cmx_class, NULL, MKDEV(major, i), "cmx%d", i);
646 "cmx%d", i);
647 646
648 return 0; 647 return 0;
649} 648}
@@ -666,7 +665,7 @@ static void reader_detach(struct pcmcia_device *link)
666 dev_table[devno] = NULL; 665 dev_table[devno] = NULL;
667 kfree(dev); 666 kfree(dev);
668 667
669 class_device_destroy(cmx_class, MKDEV(major, devno)); 668 device_destroy(cmx_class, MKDEV(major, devno));
670 669
671 return; 670 return;
672} 671}
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 52753e723eaa..b9c1dba6bd01 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -441,8 +441,7 @@ scdrv_init(void)
441 continue; 441 continue;
442 } 442 }
443 443
444 class_device_create(snsc_class, NULL, dev, NULL, 444 device_create(snsc_class, NULL, dev, "%s", devname);
445 "%s", devname);
446 445
447 ia64_sn_irtr_intr_enable(scd->scd_nasid, 446 ia64_sn_irtr_intr_enable(scd->scd_nasid,
448 0 /*ignored */ , 447 0 /*ignored */ ,
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 4a80b2f864e0..45758d5b56ef 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -4778,9 +4778,8 @@ static int __init stallion_module_init(void)
4778 if (IS_ERR(stallion_class)) 4778 if (IS_ERR(stallion_class))
4779 printk("STALLION: failed to create class\n"); 4779 printk("STALLION: failed to create class\n");
4780 for (i = 0; i < 4; i++) 4780 for (i = 0; i < 4; i++)
4781 class_device_create(stallion_class, NULL, 4781 device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
4782 MKDEV(STL_SIOMEMMAJOR, i), NULL, 4782 "staliomem%d", i);
4783 "staliomem%d", i);
4784 4783
4785 return 0; 4784 return 0;
4786err_unrtty: 4785err_unrtty:
@@ -4816,7 +4815,7 @@ static void __exit stallion_module_exit(void)
4816 } 4815 }
4817 4816
4818 for (i = 0; i < 4; i++) 4817 for (i = 0; i < 4; i++)
4819 class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); 4818 device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
4820 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"); 4819 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
4821 class_destroy(stallion_class); 4820 class_destroy(stallion_class);
4822 4821
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index 35b40b996534..cef55c40654f 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -441,8 +441,8 @@ tipar_register(int nr, struct parport *port)
441 goto out; 441 goto out;
442 } 442 }
443 443
444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, 444 device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR,
445 TIPAR_MINOR + nr), port->dev, "par%d", nr); 445 TIPAR_MINOR + nr), "par%d", nr);
446 446
447 /* Display informations */ 447 /* Display informations */
448 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == 448 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
@@ -534,7 +534,7 @@ tipar_cleanup_module(void)
534 if (table[i].dev == NULL) 534 if (table[i].dev == NULL)
535 continue; 535 continue;
536 parport_unregister_device(table[i].dev); 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 class_destroy(tipar_class); 539 class_destroy(tipar_class);
540 540
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index f1d60f0cef8f..db7a731e2362 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -871,10 +871,10 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
871 state[i].cur_part = 0; 871 state[i].cur_part = 0;
872 for (j = 0; j < MAX_PARTITIONS; ++j) 872 for (j = 0; j < MAX_PARTITIONS; ++j)
873 state[i].part_stat_rwi[j] = VIOT_IDLE; 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 "iseries!vt%d", i); 875 "iseries!vt%d", i);
876 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 876 device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
877 NULL, "iseries!nvt%d", i); 877 "iseries!nvt%d", i);
878 printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries " 878 printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
879 "resource %10.10s type %4.4s, model %3.3s\n", 879 "resource %10.10s type %4.4s, model %3.3s\n",
880 i, viotape_unitinfo[i].rsrcname, 880 i, viotape_unitinfo[i].rsrcname,
@@ -886,8 +886,8 @@ static int viotape_remove(struct vio_dev *vdev)
886{ 886{
887 int i = vdev->unit_address; 887 int i = vdev->unit_address;
888 888
889 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); 889 device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
890 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); 890 device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
891 return 0; 891 return 0;
892} 892}
893 893