diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
tree | 2624a44924c625c367f3cebf937853b9da2de282 /drivers/char/ip2/ip2main.c | |
parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/char/ip2/ip2main.c')
-rw-r--r-- | drivers/char/ip2/ip2main.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 9ab33c3d359f..a4200a2b0811 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -82,7 +82,6 @@ | |||
82 | /************/ | 82 | /************/ |
83 | /* Includes */ | 83 | /* Includes */ |
84 | /************/ | 84 | /************/ |
85 | #include <linux/config.h> | ||
86 | 85 | ||
87 | #include <linux/ctype.h> | 86 | #include <linux/ctype.h> |
88 | #include <linux/string.h> | 87 | #include <linux/string.h> |
@@ -91,7 +90,6 @@ | |||
91 | #include <linux/module.h> | 90 | #include <linux/module.h> |
92 | #include <linux/signal.h> | 91 | #include <linux/signal.h> |
93 | #include <linux/sched.h> | 92 | #include <linux/sched.h> |
94 | #include <linux/devfs_fs_kernel.h> | ||
95 | #include <linux/timer.h> | 93 | #include <linux/timer.h> |
96 | #include <linux/interrupt.h> | 94 | #include <linux/interrupt.h> |
97 | #include <linux/pci.h> | 95 | #include <linux/pci.h> |
@@ -414,9 +412,7 @@ cleanup_module(void) | |||
414 | /* free io addresses and Tibet */ | 412 | /* free io addresses and Tibet */ |
415 | release_region( ip2config.addr[i], 8 ); | 413 | release_region( ip2config.addr[i], 8 ); |
416 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); | 414 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); |
417 | devfs_remove("ip2/ipl%d", i); | ||
418 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); | 415 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); |
419 | devfs_remove("ip2/stat%d", i); | ||
420 | } | 416 | } |
421 | /* Disable and remove interrupt handler. */ | 417 | /* Disable and remove interrupt handler. */ |
422 | if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { | 418 | if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { |
@@ -425,7 +421,6 @@ cleanup_module(void) | |||
425 | } | 421 | } |
426 | } | 422 | } |
427 | class_destroy(ip2_class); | 423 | class_destroy(ip2_class); |
428 | devfs_remove("ip2"); | ||
429 | if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { | 424 | if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { |
430 | printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); | 425 | printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); |
431 | } | 426 | } |
@@ -496,8 +491,8 @@ static struct tty_operations ip2_ops = { | |||
496 | /* initialisation of the devices and driver structures, and registers itself */ | 491 | /* initialisation of the devices and driver structures, and registers itself */ |
497 | /* with the relevant kernel modules. */ | 492 | /* with the relevant kernel modules. */ |
498 | /******************************************************************************/ | 493 | /******************************************************************************/ |
499 | /* SA_INTERRUPT- if set blocks all interrupts else only this line */ | 494 | /* IRQF_DISABLED - if set blocks all interrupts else only this line */ |
500 | /* SA_SHIRQ - for shared irq PCI or maybe EISA only */ | 495 | /* IRQF_SHARED - for shared irq PCI or maybe EISA only */ |
501 | /* SA_RANDOM - can be source for cert. random number generators */ | 496 | /* SA_RANDOM - can be source for cert. random number generators */ |
502 | #define IP2_SA_FLAGS 0 | 497 | #define IP2_SA_FLAGS 0 |
503 | 498 | ||
@@ -675,7 +670,6 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) | |||
675 | 670 | ||
676 | ip2_tty_driver->owner = THIS_MODULE; | 671 | ip2_tty_driver->owner = THIS_MODULE; |
677 | ip2_tty_driver->name = "ttyF"; | 672 | ip2_tty_driver->name = "ttyF"; |
678 | ip2_tty_driver->devfs_name = "tts/F"; | ||
679 | ip2_tty_driver->driver_name = pcDriver_name; | 673 | ip2_tty_driver->driver_name = pcDriver_name; |
680 | ip2_tty_driver->major = IP2_TTY_MAJOR; | 674 | ip2_tty_driver->major = IP2_TTY_MAJOR; |
681 | ip2_tty_driver->minor_start = 0; | 675 | ip2_tty_driver->minor_start = 0; |
@@ -683,7 +677,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) | |||
683 | ip2_tty_driver->subtype = SERIAL_TYPE_NORMAL; | 677 | ip2_tty_driver->subtype = SERIAL_TYPE_NORMAL; |
684 | ip2_tty_driver->init_termios = tty_std_termios; | 678 | ip2_tty_driver->init_termios = tty_std_termios; |
685 | ip2_tty_driver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; | 679 | ip2_tty_driver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; |
686 | ip2_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; | 680 | ip2_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; |
687 | tty_set_operations(ip2_tty_driver, &ip2_ops); | 681 | tty_set_operations(ip2_tty_driver, &ip2_ops); |
688 | 682 | ||
689 | ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 ); | 683 | ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 ); |
@@ -724,26 +718,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) | |||
724 | class_device_create(ip2_class, NULL, | 718 | class_device_create(ip2_class, NULL, |
725 | MKDEV(IP2_IPL_MAJOR, 4 * i), | 719 | MKDEV(IP2_IPL_MAJOR, 4 * i), |
726 | NULL, "ipl%d", i); | 720 | NULL, "ipl%d", i); |
727 | err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i), | ||
728 | S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, | ||
729 | "ip2/ipl%d", i); | ||
730 | if (err) { | ||
731 | class_device_destroy(ip2_class, | ||
732 | MKDEV(IP2_IPL_MAJOR, 4 * i)); | ||
733 | goto out_class; | ||
734 | } | ||
735 | |||
736 | class_device_create(ip2_class, NULL, | 721 | class_device_create(ip2_class, NULL, |
737 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1), | 722 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1), |
738 | NULL, "stat%d", i); | 723 | NULL, "stat%d", i); |
739 | err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1), | ||
740 | S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, | ||
741 | "ip2/stat%d", i); | ||
742 | if (err) { | ||
743 | class_device_destroy(ip2_class, | ||
744 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); | ||
745 | goto out_class; | ||
746 | } | ||
747 | 724 | ||
748 | for ( box = 0; box < ABS_MAX_BOXES; ++box ) | 725 | for ( box = 0; box < ABS_MAX_BOXES; ++box ) |
749 | { | 726 | { |
@@ -776,7 +753,7 @@ retry: | |||
776 | if (have_requested_irq(ip2config.irq[i])) | 753 | if (have_requested_irq(ip2config.irq[i])) |
777 | continue; | 754 | continue; |
778 | rc = request_irq( ip2config.irq[i], ip2_interrupt, | 755 | rc = request_irq( ip2config.irq[i], ip2_interrupt, |
779 | IP2_SA_FLAGS | (ip2config.type[i] == PCI ? SA_SHIRQ : 0), | 756 | IP2_SA_FLAGS | (ip2config.type[i] == PCI ? IRQF_SHARED : 0), |
780 | pcName, (void *)&pcName); | 757 | pcName, (void *)&pcName); |
781 | if (rc) { | 758 | if (rc) { |
782 | printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc); | 759 | printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc); |