diff options
Diffstat (limited to 'drivers/block/paride/pg.c')
-rw-r--r-- | drivers/block/paride/pg.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index 9f72bdd2e206..3d464f767eaf 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c | |||
@@ -676,22 +676,13 @@ static int __init pg_init(void) | |||
676 | } | 676 | } |
677 | for (unit = 0; unit < PG_UNITS; unit++) { | 677 | for (unit = 0; unit < PG_UNITS; unit++) { |
678 | struct pg *dev = &devices[unit]; | 678 | struct pg *dev = &devices[unit]; |
679 | if (dev->present) { | 679 | if (dev->present) |
680 | class_device_create(pg_class, NULL, MKDEV(major, unit), | 680 | class_device_create(pg_class, NULL, MKDEV(major, unit), |
681 | NULL, "pg%u", unit); | 681 | NULL, "pg%u", unit); |
682 | err = devfs_mk_cdev(MKDEV(major, unit), | ||
683 | S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", | ||
684 | unit); | ||
685 | if (err) | ||
686 | goto out_class; | ||
687 | } | ||
688 | } | 682 | } |
689 | err = 0; | 683 | err = 0; |
690 | goto out; | 684 | goto out; |
691 | 685 | ||
692 | out_class: | ||
693 | class_device_destroy(pg_class, MKDEV(major, unit)); | ||
694 | class_destroy(pg_class); | ||
695 | out_chrdev: | 686 | out_chrdev: |
696 | unregister_chrdev(major, "pg"); | 687 | unregister_chrdev(major, "pg"); |
697 | out: | 688 | out: |