aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tipar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tipar.c')
-rw-r--r--drivers/char/tipar.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index 079db5a935a1..f7802e5bd7ca 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -56,7 +56,6 @@
56#include <linux/ioport.h> 56#include <linux/ioport.h>
57#include <asm/io.h> 57#include <asm/io.h>
58#include <linux/bitops.h> 58#include <linux/bitops.h>
59#include <linux/devfs_fs_kernel.h> /* DevFs support */
60#include <linux/parport.h> /* Our code depend on parport */ 59#include <linux/parport.h> /* Our code depend on parport */
61#include <linux/device.h> 60#include <linux/device.h>
62 61
@@ -443,12 +442,6 @@ tipar_register(int nr, struct parport *port)
443 442
444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, 443 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
445 TIPAR_MINOR + nr), NULL, "par%d", nr); 444 TIPAR_MINOR + nr), NULL, "par%d", nr);
446 /* Use devfs, tree: /dev/ticables/par/[0..2] */
447 err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),
448 S_IFCHR | S_IRUGO | S_IWUGO,
449 "ticables/par/%d", nr);
450 if (err)
451 goto out_class;
452 445
453 /* Display informations */ 446 /* Display informations */
454 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == 447 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
@@ -460,11 +453,7 @@ tipar_register(int nr, struct parport *port)
460 pr_info("tipar%d: link cable not found\n", nr); 453 pr_info("tipar%d: link cable not found\n", nr);
461 454
462 err = 0; 455 err = 0;
463 goto out;
464 456
465out_class:
466 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr));
467 class_destroy(tipar_class);
468out: 457out:
469 return err; 458 return err;
470} 459}
@@ -507,9 +496,6 @@ tipar_init_module(void)
507 goto out; 496 goto out;
508 } 497 }
509 498
510 /* Use devfs with tree: /dev/ticables/par/[0..2] */
511 devfs_mk_dir("ticables/par");
512
513 tipar_class = class_create(THIS_MODULE, "ticables"); 499 tipar_class = class_create(THIS_MODULE, "ticables");
514 if (IS_ERR(tipar_class)) { 500 if (IS_ERR(tipar_class)) {
515 err = PTR_ERR(tipar_class); 501 err = PTR_ERR(tipar_class);
@@ -528,7 +514,6 @@ out_class:
528 class_destroy(tipar_class); 514 class_destroy(tipar_class);
529 515
530out_chrdev: 516out_chrdev:
531 devfs_remove("ticables/par");
532 unregister_chrdev(TIPAR_MAJOR, "tipar"); 517 unregister_chrdev(TIPAR_MAJOR, "tipar");
533out: 518out:
534 return err; 519 return err;
@@ -549,10 +534,8 @@ tipar_cleanup_module(void)
549 continue; 534 continue;
550 parport_unregister_device(table[i].dev); 535 parport_unregister_device(table[i].dev);
551 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); 536 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
552 devfs_remove("ticables/par/%d", i);
553 } 537 }
554 class_destroy(tipar_class); 538 class_destroy(tipar_class);
555 devfs_remove("ticables/par");
556 539
557 pr_info("tipar: module unloaded\n"); 540 pr_info("tipar: module unloaded\n");
558} 541}