aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c14
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);
273static int ppp_disconnect_channel(struct channel *pch); 273static int ppp_disconnect_channel(struct channel *pch);
274static void ppp_destroy_channel(struct channel *pch); 274static void ppp_destroy_channel(struct channel *pch);
275 275
276static struct class_simple *ppp_class; 276static 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) */
279static inline int proto_to_npindex(int proto) 279static 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
878out_class: 878out_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);
881out_chrdev: 881out_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/*