aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ppdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ppdev.c')
-rw-r--r--drivers/char/ppdev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 5eda075c62bd..0e22880432bc 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -737,7 +737,7 @@ static unsigned int pp_poll (struct file * file, poll_table * wait)
737 return mask; 737 return mask;
738} 738}
739 739
740static struct class_simple *ppdev_class; 740static struct class *ppdev_class;
741 741
742static struct file_operations pp_fops = { 742static struct file_operations pp_fops = {
743 .owner = THIS_MODULE, 743 .owner = THIS_MODULE,
@@ -752,13 +752,13 @@ static struct file_operations pp_fops = {
752 752
753static void pp_attach(struct parport *port) 753static void pp_attach(struct parport *port)
754{ 754{
755 class_simple_device_add(ppdev_class, MKDEV(PP_MAJOR, port->number), 755 class_device_create(ppdev_class, MKDEV(PP_MAJOR, port->number),
756 NULL, "parport%d", port->number); 756 NULL, "parport%d", port->number);
757} 757}
758 758
759static void pp_detach(struct parport *port) 759static void pp_detach(struct parport *port)
760{ 760{
761 class_simple_device_remove(MKDEV(PP_MAJOR, port->number)); 761 class_device_destroy(ppdev_class, MKDEV(PP_MAJOR, port->number));
762} 762}
763 763
764static struct parport_driver pp_driver = { 764static struct parport_driver pp_driver = {
@@ -776,7 +776,7 @@ static int __init ppdev_init (void)
776 PP_MAJOR); 776 PP_MAJOR);
777 return -EIO; 777 return -EIO;
778 } 778 }
779 ppdev_class = class_simple_create(THIS_MODULE, CHRDEV); 779 ppdev_class = class_create(THIS_MODULE, CHRDEV);
780 if (IS_ERR(ppdev_class)) { 780 if (IS_ERR(ppdev_class)) {
781 err = PTR_ERR(ppdev_class); 781 err = PTR_ERR(ppdev_class);
782 goto out_chrdev; 782 goto out_chrdev;
@@ -798,7 +798,7 @@ out_class:
798 for (i = 0; i < PARPORT_MAX; i++) 798 for (i = 0; i < PARPORT_MAX; i++)
799 devfs_remove("parports/%d", i); 799 devfs_remove("parports/%d", i);
800 devfs_remove("parports"); 800 devfs_remove("parports");
801 class_simple_destroy(ppdev_class); 801 class_destroy(ppdev_class);
802out_chrdev: 802out_chrdev:
803 unregister_chrdev(PP_MAJOR, CHRDEV); 803 unregister_chrdev(PP_MAJOR, CHRDEV);
804out: 804out:
@@ -813,7 +813,7 @@ static void __exit ppdev_cleanup (void)
813 devfs_remove("parports/%d", i); 813 devfs_remove("parports/%d", i);
814 parport_unregister_driver(&pp_driver); 814 parport_unregister_driver(&pp_driver);
815 devfs_remove("parports"); 815 devfs_remove("parports");
816 class_simple_destroy(ppdev_class); 816 class_destroy(ppdev_class);
817 unregister_chrdev (PP_MAJOR, CHRDEV); 817 unregister_chrdev (PP_MAJOR, CHRDEV);
818} 818}
819 819