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 /drivers/net/ppp_generic.c | |
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>
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp_generic.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 | /* |