diff options
author | gregkh@suse.de <gregkh@suse.de> | 2005-03-23 13:01:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:09 -0400 |
commit | 56b2293595b2eb52cc2aa2baf92c6cfa8265f9d5 (patch) | |
tree | 5cbada5b35b1b87dfd75852c9397a2b14dfbb9d9 | |
parent | 8874b414ffe037c39e73bb262ddf69653a13c0a4 (diff) |
[PATCH] class: convert drivers/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/isdn/capi/capi.c | 14 | ||||
-rw-r--r-- | drivers/macintosh/adb.c | 9 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvbdev.c | 13 | ||||
-rw-r--r-- | drivers/net/ppp_generic.c | 14 | ||||
-rw-r--r-- | drivers/net/wan/cosa.c | 12 | ||||
-rw-r--r-- | drivers/s390/char/tape_class.c | 10 | ||||
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 10 | ||||
-rw-r--r-- | drivers/usb/core/file.c | 12 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 10 |
9 files changed, 51 insertions, 53 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 12dee8e9fbbe..04fb606b5ddd 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL"); | |||
58 | 58 | ||
59 | /* -------- driver information -------------------------------------- */ | 59 | /* -------- driver information -------------------------------------- */ |
60 | 60 | ||
61 | static struct class_simple *capi_class; | 61 | static struct class *capi_class; |
62 | 62 | ||
63 | static int capi_major = 68; /* allocated */ | 63 | static int capi_major = 68; /* allocated */ |
64 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE | 64 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE |
@@ -1499,20 +1499,20 @@ static int __init capi_init(void) | |||
1499 | return -EIO; | 1499 | return -EIO; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | capi_class = class_simple_create(THIS_MODULE, "capi"); | 1502 | capi_class = class_create(THIS_MODULE, "capi"); |
1503 | if (IS_ERR(capi_class)) { | 1503 | if (IS_ERR(capi_class)) { |
1504 | unregister_chrdev(capi_major, "capi20"); | 1504 | unregister_chrdev(capi_major, "capi20"); |
1505 | return PTR_ERR(capi_class); | 1505 | return PTR_ERR(capi_class); |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | class_simple_device_add(capi_class, MKDEV(capi_major, 0), NULL, "capi"); | 1508 | class_device_create(capi_class, MKDEV(capi_major, 0), NULL, "capi"); |
1509 | devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, | 1509 | devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, |
1510 | "isdn/capi20"); | 1510 | "isdn/capi20"); |
1511 | 1511 | ||
1512 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE | 1512 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE |
1513 | if (capinc_tty_init() < 0) { | 1513 | if (capinc_tty_init() < 0) { |
1514 | class_simple_device_remove(MKDEV(capi_major, 0)); | 1514 | class_device_destroy(capi_class, MKDEV(capi_major, 0)); |
1515 | class_simple_destroy(capi_class); | 1515 | class_destroy(capi_class); |
1516 | unregister_chrdev(capi_major, "capi20"); | 1516 | unregister_chrdev(capi_major, "capi20"); |
1517 | return -ENOMEM; | 1517 | return -ENOMEM; |
1518 | } | 1518 | } |
@@ -1539,8 +1539,8 @@ static void __exit capi_exit(void) | |||
1539 | { | 1539 | { |
1540 | proc_exit(); | 1540 | proc_exit(); |
1541 | 1541 | ||
1542 | class_simple_device_remove(MKDEV(capi_major, 0)); | 1542 | class_device_destroy(capi_class, MKDEV(capi_major, 0)); |
1543 | class_simple_destroy(capi_class); | 1543 | class_destroy(capi_class); |
1544 | unregister_chrdev(capi_major, "capi20"); | 1544 | unregister_chrdev(capi_major, "capi20"); |
1545 | devfs_remove("isdn/capi20"); | 1545 | devfs_remove("isdn/capi20"); |
1546 | 1546 | ||
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 7297c77f99cf..493e2afa191c 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -77,7 +77,7 @@ static struct adb_driver *adb_driver_list[] = { | |||
77 | NULL | 77 | NULL |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static struct class_simple *adb_dev_class; | 80 | static struct class *adb_dev_class; |
81 | 81 | ||
82 | struct adb_driver *adb_controller; | 82 | struct adb_driver *adb_controller; |
83 | struct notifier_block *adb_client_list = NULL; | 83 | struct notifier_block *adb_client_list = NULL; |
@@ -902,9 +902,8 @@ adbdev_init(void) | |||
902 | 902 | ||
903 | devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); | 903 | devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); |
904 | 904 | ||
905 | adb_dev_class = class_simple_create(THIS_MODULE, "adb"); | 905 | adb_dev_class = class_create(THIS_MODULE, "adb"); |
906 | if (IS_ERR(adb_dev_class)) { | 906 | if (IS_ERR(adb_dev_class)) |
907 | return; | 907 | return; |
908 | } | 908 | class_device_create(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); |
909 | class_simple_device_add(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); | ||
910 | } | 909 | } |
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index 9d9662f4b8e6..4b7adca3e286 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c | |||
@@ -56,8 +56,7 @@ static const char * const dnames[] = { | |||
56 | #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) | 56 | #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) |
57 | #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) | 57 | #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) |
58 | 58 | ||
59 | struct class_simple *dvb_class; | 59 | static struct class *dvb_class; |
60 | EXPORT_SYMBOL(dvb_class); | ||
61 | 60 | ||
62 | static struct dvb_device* dvbdev_find_device (int minor) | 61 | static struct dvb_device* dvbdev_find_device (int minor) |
63 | { | 62 | { |
@@ -236,8 +235,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, | |||
236 | S_IFCHR | S_IRUSR | S_IWUSR, | 235 | S_IFCHR | S_IRUSR | S_IWUSR, |
237 | "dvb/adapter%d/%s%d", adap->num, dnames[type], id); | 236 | "dvb/adapter%d/%s%d", adap->num, dnames[type], id); |
238 | 237 | ||
239 | class_simple_device_add(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), | 238 | class_device_create(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), |
240 | NULL, "dvb%d.%s%d", adap->num, dnames[type], id); | 239 | NULL, "dvb%d.%s%d", adap->num, dnames[type], id); |
241 | 240 | ||
242 | dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", | 241 | dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", |
243 | adap->num, dnames[type], id, nums2minor(adap->num, type, id), | 242 | adap->num, dnames[type], id, nums2minor(adap->num, type, id), |
@@ -256,7 +255,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev) | |||
256 | devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, | 255 | devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, |
257 | dnames[dvbdev->type], dvbdev->id); | 256 | dnames[dvbdev->type], dvbdev->id); |
258 | 257 | ||
259 | class_simple_device_remove(MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, | 258 | class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, |
260 | dvbdev->type, dvbdev->id))); | 259 | dvbdev->type, dvbdev->id))); |
261 | 260 | ||
262 | list_del (&dvbdev->list_head); | 261 | list_del (&dvbdev->list_head); |
@@ -412,7 +411,7 @@ static int __init init_dvbdev(void) | |||
412 | 411 | ||
413 | devfs_mk_dir("dvb"); | 412 | devfs_mk_dir("dvb"); |
414 | 413 | ||
415 | dvb_class = class_simple_create(THIS_MODULE, "dvb"); | 414 | dvb_class = class_create(THIS_MODULE, "dvb"); |
416 | if (IS_ERR(dvb_class)) { | 415 | if (IS_ERR(dvb_class)) { |
417 | retval = PTR_ERR(dvb_class); | 416 | retval = PTR_ERR(dvb_class); |
418 | goto error; | 417 | goto error; |
@@ -429,7 +428,7 @@ error: | |||
429 | static void __exit exit_dvbdev(void) | 428 | static void __exit exit_dvbdev(void) |
430 | { | 429 | { |
431 | devfs_remove("dvb"); | 430 | devfs_remove("dvb"); |
432 | class_simple_destroy(dvb_class); | 431 | class_destroy(dvb_class); |
433 | cdev_del(&dvb_device_cdev); | 432 | cdev_del(&dvb_device_cdev); |
434 | unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); | 433 | unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); |
435 | } | 434 | } |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ad4b58af6b76..ab726ab43798 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -273,7 +273,7 @@ static int ppp_connect_channel(struct channel *pch, int unit); | |||
273 | static int ppp_disconnect_channel(struct channel *pch); | 273 | static int ppp_disconnect_channel(struct channel *pch); |
274 | static void ppp_destroy_channel(struct channel *pch); | 274 | static void ppp_destroy_channel(struct channel *pch); |
275 | 275 | ||
276 | static struct class_simple *ppp_class; | 276 | static struct class *ppp_class; |
277 | 277 | ||
278 | /* Translates a PPP protocol number to a NP index (NP == network protocol) */ | 278 | /* Translates a PPP protocol number to a NP index (NP == network protocol) */ |
279 | static inline int proto_to_npindex(int proto) | 279 | static inline int proto_to_npindex(int proto) |
@@ -858,12 +858,12 @@ static int __init ppp_init(void) | |||
858 | printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); | 858 | printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); |
859 | err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); | 859 | err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); |
860 | if (!err) { | 860 | if (!err) { |
861 | ppp_class = class_simple_create(THIS_MODULE, "ppp"); | 861 | ppp_class = class_create(THIS_MODULE, "ppp"); |
862 | if (IS_ERR(ppp_class)) { | 862 | if (IS_ERR(ppp_class)) { |
863 | err = PTR_ERR(ppp_class); | 863 | err = PTR_ERR(ppp_class); |
864 | goto out_chrdev; | 864 | goto out_chrdev; |
865 | } | 865 | } |
866 | class_simple_device_add(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); | 866 | class_device_create(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); |
867 | err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), | 867 | err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), |
868 | S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); | 868 | S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); |
869 | if (err) | 869 | if (err) |
@@ -876,8 +876,8 @@ out: | |||
876 | return err; | 876 | return err; |
877 | 877 | ||
878 | out_class: | 878 | out_class: |
879 | class_simple_device_remove(MKDEV(PPP_MAJOR,0)); | 879 | class_device_destroy(ppp_class, MKDEV(PPP_MAJOR,0)); |
880 | class_simple_destroy(ppp_class); | 880 | class_destroy(ppp_class); |
881 | out_chrdev: | 881 | out_chrdev: |
882 | unregister_chrdev(PPP_MAJOR, "ppp"); | 882 | unregister_chrdev(PPP_MAJOR, "ppp"); |
883 | goto out; | 883 | goto out; |
@@ -2654,8 +2654,8 @@ static void __exit ppp_cleanup(void) | |||
2654 | if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) | 2654 | if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) |
2655 | printk(KERN_ERR "PPP: failed to unregister PPP device\n"); | 2655 | printk(KERN_ERR "PPP: failed to unregister PPP device\n"); |
2656 | devfs_remove("ppp"); | 2656 | devfs_remove("ppp"); |
2657 | class_simple_device_remove(MKDEV(PPP_MAJOR, 0)); | 2657 | class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); |
2658 | class_simple_destroy(ppp_class); | 2658 | class_destroy(ppp_class); |
2659 | } | 2659 | } |
2660 | 2660 | ||
2661 | /* | 2661 | /* |
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 921a573372e9..7ff814fd65d0 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c | |||
@@ -235,7 +235,7 @@ static int dma[MAX_CARDS+1]; | |||
235 | static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; | 235 | static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; |
236 | 236 | ||
237 | /* for class stuff*/ | 237 | /* for class stuff*/ |
238 | static struct class_simple *cosa_class; | 238 | static struct class *cosa_class; |
239 | 239 | ||
240 | #ifdef MODULE | 240 | #ifdef MODULE |
241 | module_param_array(io, int, NULL, 0); | 241 | module_param_array(io, int, NULL, 0); |
@@ -394,19 +394,19 @@ static int __init cosa_init(void) | |||
394 | goto out; | 394 | goto out; |
395 | } | 395 | } |
396 | devfs_mk_dir("cosa"); | 396 | devfs_mk_dir("cosa"); |
397 | cosa_class = class_simple_create(THIS_MODULE, "cosa"); | 397 | cosa_class = class_create(THIS_MODULE, "cosa"); |
398 | if (IS_ERR(cosa_class)) { | 398 | if (IS_ERR(cosa_class)) { |
399 | err = PTR_ERR(cosa_class); | 399 | err = PTR_ERR(cosa_class); |
400 | goto out_chrdev; | 400 | goto out_chrdev; |
401 | } | 401 | } |
402 | for (i=0; i<nr_cards; i++) { | 402 | for (i=0; i<nr_cards; i++) { |
403 | class_simple_device_add(cosa_class, MKDEV(cosa_major, i), | 403 | class_device_create(cosa_class, MKDEV(cosa_major, i), |
404 | NULL, "cosa%d", i); | 404 | NULL, "cosa%d", i); |
405 | err = devfs_mk_cdev(MKDEV(cosa_major, i), | 405 | err = devfs_mk_cdev(MKDEV(cosa_major, i), |
406 | S_IFCHR|S_IRUSR|S_IWUSR, | 406 | S_IFCHR|S_IRUSR|S_IWUSR, |
407 | "cosa/%d", i); | 407 | "cosa/%d", i); |
408 | if (err) { | 408 | if (err) { |
409 | class_simple_device_remove(MKDEV(cosa_major, i)); | 409 | class_device_destroy(cosa_class, MKDEV(cosa_major, i)); |
410 | goto out_chrdev; | 410 | goto out_chrdev; |
411 | } | 411 | } |
412 | } | 412 | } |
@@ -427,10 +427,10 @@ static void __exit cosa_exit(void) | |||
427 | printk(KERN_INFO "Unloading the cosa module\n"); | 427 | printk(KERN_INFO "Unloading the cosa module\n"); |
428 | 428 | ||
429 | for (i=0; i<nr_cards; i++) { | 429 | for (i=0; i<nr_cards; i++) { |
430 | class_simple_device_remove(MKDEV(cosa_major, i)); | 430 | class_device_destroy(cosa_class, MKDEV(cosa_major, i)); |
431 | devfs_remove("cosa/%d", i); | 431 | devfs_remove("cosa/%d", i); |
432 | } | 432 | } |
433 | class_simple_destroy(cosa_class); | 433 | class_destroy(cosa_class); |
434 | devfs_remove("cosa"); | 434 | devfs_remove("cosa"); |
435 | for (cosa=cosa_cards; nr_cards--; cosa++) { | 435 | for (cosa=cosa_cards; nr_cards--; cosa++) { |
436 | /* Clean up the per-channel data */ | 436 | /* Clean up the per-channel data */ |
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 0f8ffd4167ca..ed0cb1f15b4c 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -16,7 +16,7 @@ MODULE_DESCRIPTION( | |||
16 | ); | 16 | ); |
17 | MODULE_LICENSE("GPL"); | 17 | MODULE_LICENSE("GPL"); |
18 | 18 | ||
19 | struct class_simple *tape_class; | 19 | static struct class *tape_class; |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Register a tape device and return a pointer to the cdev structure. | 22 | * Register a tape device and return a pointer to the cdev structure. |
@@ -70,7 +70,7 @@ struct tape_class_device *register_tape_dev( | |||
70 | if (rc) | 70 | if (rc) |
71 | goto fail_with_cdev; | 71 | goto fail_with_cdev; |
72 | 72 | ||
73 | tcd->class_device = class_simple_device_add( | 73 | tcd->class_device = class_device_create( |
74 | tape_class, | 74 | tape_class, |
75 | tcd->char_device->dev, | 75 | tcd->char_device->dev, |
76 | device, | 76 | device, |
@@ -101,7 +101,7 @@ void unregister_tape_dev(struct tape_class_device *tcd) | |||
101 | &tcd->class_device->dev->kobj, | 101 | &tcd->class_device->dev->kobj, |
102 | tcd->mode_name | 102 | tcd->mode_name |
103 | ); | 103 | ); |
104 | class_simple_device_remove(tcd->char_device->dev); | 104 | class_device_destroy(tape_class, tcd->char_device->dev); |
105 | cdev_del(tcd->char_device); | 105 | cdev_del(tcd->char_device); |
106 | kfree(tcd); | 106 | kfree(tcd); |
107 | } | 107 | } |
@@ -111,14 +111,14 @@ EXPORT_SYMBOL(unregister_tape_dev); | |||
111 | 111 | ||
112 | static int __init tape_init(void) | 112 | static int __init tape_init(void) |
113 | { | 113 | { |
114 | tape_class = class_simple_create(THIS_MODULE, "tape390"); | 114 | tape_class = class_create(THIS_MODULE, "tape390"); |
115 | 115 | ||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static void __exit tape_exit(void) | 119 | static void __exit tape_exit(void) |
120 | { | 120 | { |
121 | class_simple_destroy(tape_class); | 121 | class_destroy(tape_class); |
122 | tape_class = NULL; | 122 | tape_class = NULL; |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index edf50d2bd10b..724ad87f0613 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -703,7 +703,7 @@ static struct attribute_group vmlogrdr_attr_group = { | |||
703 | .attrs = vmlogrdr_attrs, | 703 | .attrs = vmlogrdr_attrs, |
704 | }; | 704 | }; |
705 | 705 | ||
706 | static struct class_simple *vmlogrdr_class; | 706 | static struct class *vmlogrdr_class; |
707 | static struct device_driver vmlogrdr_driver = { | 707 | static struct device_driver vmlogrdr_driver = { |
708 | .name = "vmlogrdr", | 708 | .name = "vmlogrdr", |
709 | .bus = &iucv_bus, | 709 | .bus = &iucv_bus, |
@@ -727,7 +727,7 @@ vmlogrdr_register_driver(void) { | |||
727 | goto unregdriver; | 727 | goto unregdriver; |
728 | } | 728 | } |
729 | 729 | ||
730 | vmlogrdr_class = class_simple_create(THIS_MODULE, "vmlogrdr"); | 730 | vmlogrdr_class = class_create(THIS_MODULE, "vmlogrdr"); |
731 | if (IS_ERR(vmlogrdr_class)) { | 731 | if (IS_ERR(vmlogrdr_class)) { |
732 | printk(KERN_ERR "vmlogrdr: failed to create class.\n"); | 732 | printk(KERN_ERR "vmlogrdr: failed to create class.\n"); |
733 | ret=PTR_ERR(vmlogrdr_class); | 733 | ret=PTR_ERR(vmlogrdr_class); |
@@ -746,7 +746,7 @@ unregdriver: | |||
746 | 746 | ||
747 | static void | 747 | static void |
748 | vmlogrdr_unregister_driver(void) { | 748 | vmlogrdr_unregister_driver(void) { |
749 | class_simple_destroy(vmlogrdr_class); | 749 | class_destroy(vmlogrdr_class); |
750 | vmlogrdr_class = NULL; | 750 | vmlogrdr_class = NULL; |
751 | driver_remove_file(&vmlogrdr_driver, &driver_attr_recording_status); | 751 | driver_remove_file(&vmlogrdr_driver, &driver_attr_recording_status); |
752 | driver_unregister(&vmlogrdr_driver); | 752 | driver_unregister(&vmlogrdr_driver); |
@@ -786,7 +786,7 @@ vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) { | |||
786 | device_unregister(dev); | 786 | device_unregister(dev); |
787 | return ret; | 787 | return ret; |
788 | } | 788 | } |
789 | priv->class_device = class_simple_device_add( | 789 | priv->class_device = class_device_create( |
790 | vmlogrdr_class, | 790 | vmlogrdr_class, |
791 | MKDEV(vmlogrdr_major, priv->minor_num), | 791 | MKDEV(vmlogrdr_major, priv->minor_num), |
792 | dev, | 792 | dev, |
@@ -806,7 +806,7 @@ vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) { | |||
806 | 806 | ||
807 | static int | 807 | static int |
808 | vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv ) { | 808 | vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv ) { |
809 | class_simple_device_remove(MKDEV(vmlogrdr_major, priv->minor_num)); | 809 | class_device_destroy(vmlogrdr_class, MKDEV(vmlogrdr_major, priv->minor_num)); |
810 | if (priv->device != NULL) { | 810 | if (priv->device != NULL) { |
811 | sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group); | 811 | sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group); |
812 | device_unregister(priv->device); | 812 | device_unregister(priv->device); |
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 38ed2220c9fc..dfcbd05d0e81 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -68,7 +68,7 @@ static struct file_operations usb_fops = { | |||
68 | .open = usb_open, | 68 | .open = usb_open, |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static struct class_simple *usb_class; | 71 | static struct class *usb_class; |
72 | 72 | ||
73 | int usb_major_init(void) | 73 | int usb_major_init(void) |
74 | { | 74 | { |
@@ -80,9 +80,9 @@ int usb_major_init(void) | |||
80 | goto out; | 80 | goto out; |
81 | } | 81 | } |
82 | 82 | ||
83 | usb_class = class_simple_create(THIS_MODULE, "usb"); | 83 | usb_class = class_create(THIS_MODULE, "usb"); |
84 | if (IS_ERR(usb_class)) { | 84 | if (IS_ERR(usb_class)) { |
85 | err("class_simple_create failed for usb devices"); | 85 | err("class_create failed for usb devices"); |
86 | unregister_chrdev(USB_MAJOR, "usb"); | 86 | unregister_chrdev(USB_MAJOR, "usb"); |
87 | goto out; | 87 | goto out; |
88 | } | 88 | } |
@@ -95,7 +95,7 @@ out: | |||
95 | 95 | ||
96 | void usb_major_cleanup(void) | 96 | void usb_major_cleanup(void) |
97 | { | 97 | { |
98 | class_simple_destroy(usb_class); | 98 | class_destroy(usb_class); |
99 | devfs_remove("usb"); | 99 | devfs_remove("usb"); |
100 | unregister_chrdev(USB_MAJOR, "usb"); | 100 | unregister_chrdev(USB_MAJOR, "usb"); |
101 | } | 101 | } |
@@ -171,7 +171,7 @@ int usb_register_dev(struct usb_interface *intf, | |||
171 | ++temp; | 171 | ++temp; |
172 | else | 172 | else |
173 | temp = name; | 173 | temp = name; |
174 | intf->class_dev = class_simple_device_add(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); | 174 | intf->class_dev = class_device_create(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); |
175 | if (IS_ERR(intf->class_dev)) { | 175 | if (IS_ERR(intf->class_dev)) { |
176 | spin_lock (&minor_lock); | 176 | spin_lock (&minor_lock); |
177 | usb_minors[intf->minor] = NULL; | 177 | usb_minors[intf->minor] = NULL; |
@@ -220,7 +220,7 @@ void usb_deregister_dev(struct usb_interface *intf, | |||
220 | 220 | ||
221 | snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); | 221 | snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); |
222 | devfs_remove (name); | 222 | devfs_remove (name); |
223 | class_simple_device_remove(MKDEV(USB_MAJOR, intf->minor)); | 223 | class_device_destroy(usb_class, MKDEV(USB_MAJOR, intf->minor)); |
224 | intf->class_dev = NULL; | 224 | intf->class_dev = NULL; |
225 | intf->minor = -1; | 225 | intf->minor = -1; |
226 | } | 226 | } |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 7705070191d9..8cef020d1801 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1040,7 +1040,7 @@ static struct file_operations fb_fops = { | |||
1040 | #endif | 1040 | #endif |
1041 | }; | 1041 | }; |
1042 | 1042 | ||
1043 | static struct class_simple *fb_class; | 1043 | static struct class *fb_class; |
1044 | 1044 | ||
1045 | /** | 1045 | /** |
1046 | * register_framebuffer - registers a frame buffer device | 1046 | * register_framebuffer - registers a frame buffer device |
@@ -1066,7 +1066,7 @@ register_framebuffer(struct fb_info *fb_info) | |||
1066 | break; | 1066 | break; |
1067 | fb_info->node = i; | 1067 | fb_info->node = i; |
1068 | 1068 | ||
1069 | fb_info->class_device = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), | 1069 | fb_info->class_device = class_device_create(fb_class, MKDEV(FB_MAJOR, i), |
1070 | fb_info->device, "fb%d", i); | 1070 | fb_info->device, "fb%d", i); |
1071 | if (IS_ERR(fb_info->class_device)) { | 1071 | if (IS_ERR(fb_info->class_device)) { |
1072 | /* Not fatal */ | 1072 | /* Not fatal */ |
@@ -1134,7 +1134,7 @@ unregister_framebuffer(struct fb_info *fb_info) | |||
1134 | registered_fb[i]=NULL; | 1134 | registered_fb[i]=NULL; |
1135 | num_registered_fb--; | 1135 | num_registered_fb--; |
1136 | fb_cleanup_class_device(fb_info); | 1136 | fb_cleanup_class_device(fb_info); |
1137 | class_simple_device_remove(MKDEV(FB_MAJOR, i)); | 1137 | class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); |
1138 | return 0; | 1138 | return 0; |
1139 | } | 1139 | } |
1140 | 1140 | ||
@@ -1197,7 +1197,7 @@ fbmem_init(void) | |||
1197 | if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) | 1197 | if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) |
1198 | printk("unable to get major %d for fb devs\n", FB_MAJOR); | 1198 | printk("unable to get major %d for fb devs\n", FB_MAJOR); |
1199 | 1199 | ||
1200 | fb_class = class_simple_create(THIS_MODULE, "graphics"); | 1200 | fb_class = class_create(THIS_MODULE, "graphics"); |
1201 | if (IS_ERR(fb_class)) { | 1201 | if (IS_ERR(fb_class)) { |
1202 | printk(KERN_WARNING "Unable to create fb class; errno = %ld\n", PTR_ERR(fb_class)); | 1202 | printk(KERN_WARNING "Unable to create fb class; errno = %ld\n", PTR_ERR(fb_class)); |
1203 | fb_class = NULL; | 1203 | fb_class = NULL; |
@@ -1210,7 +1210,7 @@ module_init(fbmem_init); | |||
1210 | static void __exit | 1210 | static void __exit |
1211 | fbmem_exit(void) | 1211 | fbmem_exit(void) |
1212 | { | 1212 | { |
1213 | class_simple_destroy(fb_class); | 1213 | class_destroy(fb_class); |
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | module_exit(fbmem_exit); | 1216 | module_exit(fbmem_exit); |