aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/char/agp/hp-agp.c5
-rw-r--r--drivers/char/dtlk.c6
-rw-r--r--drivers/char/hvc_iseries.c2
-rw-r--r--drivers/char/hvc_vio.c2
-rw-r--r--drivers/char/hvcs.c2
-rw-r--r--drivers/char/isicom.c2
-rw-r--r--drivers/char/istallion.c2
-rw-r--r--drivers/char/mem.c115
-rw-r--r--drivers/char/moxa.c7
-rw-r--r--drivers/char/ppdev.c29
-rw-r--r--drivers/char/sysrq.c15
12 files changed, 80 insertions, 109 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 30bae6de6a0d..0bd01f49cfd8 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -807,7 +807,7 @@ if RTC_LIB=n
807config RTC 807config RTC
808 tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)" 808 tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
809 depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ 809 depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \
810 && !ARM && !SUPERH && !S390 && !AVR32 810 && !ARM && !SUPERH && !S390 && !AVR32 && !BLACKFIN
811 ---help--- 811 ---help---
812 If you say Y here and create a character special file /dev/rtc with 812 If you say Y here and create a character special file /dev/rtc with
813 major number 10 and minor number 135 using mknod ("man mknod"), you 813 major number 10 and minor number 135 using mknod ("man mknod"), you
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
index abea273dcc2f..8f3d4c184914 100644
--- a/drivers/char/agp/hp-agp.c
+++ b/drivers/char/agp/hp-agp.c
@@ -517,8 +517,9 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
517 if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa)) 517 if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa))
518 return AE_OK; 518 return AE_OK;
519 519
520 printk(KERN_INFO PFX "Detected HP ZX1 %s AGP chipset (ioc=%lx, lba=%lx)\n", 520 printk(KERN_INFO PFX "Detected HP ZX1 %s AGP chipset "
521 (char *) context, sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa); 521 "(ioc=%llx, lba=%llx)\n", (char *)context,
522 sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa);
522 523
523 hp_zx1_gart_found = 1; 524 hp_zx1_gart_found = 1;
524 return AE_CTRL_TERMINATE; /* we only support one bridge; quit looking */ 525 return AE_CTRL_TERMINATE; /* we only support one bridge; quit looking */
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 6b900b297cc6..52e06589821d 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -571,7 +571,7 @@ static char dtlk_read_tts(void)
571 portval = inb_p(dtlk_port_tts); 571 portval = inb_p(dtlk_port_tts);
572 } while ((portval & TTS_READABLE) == 0 && 572 } while ((portval & TTS_READABLE) == 0 &&
573 retries++ < DTLK_MAX_RETRIES); 573 retries++ < DTLK_MAX_RETRIES);
574 if (retries == DTLK_MAX_RETRIES) 574 if (retries > DTLK_MAX_RETRIES)
575 printk(KERN_ERR "dtlk_read_tts() timeout\n"); 575 printk(KERN_ERR "dtlk_read_tts() timeout\n");
576 576
577 ch = inb_p(dtlk_port_tts); /* input from TTS port */ 577 ch = inb_p(dtlk_port_tts); /* input from TTS port */
@@ -583,7 +583,7 @@ static char dtlk_read_tts(void)
583 portval = inb_p(dtlk_port_tts); 583 portval = inb_p(dtlk_port_tts);
584 } while ((portval & TTS_READABLE) != 0 && 584 } while ((portval & TTS_READABLE) != 0 &&
585 retries++ < DTLK_MAX_RETRIES); 585 retries++ < DTLK_MAX_RETRIES);
586 if (retries == DTLK_MAX_RETRIES) 586 if (retries > DTLK_MAX_RETRIES)
587 printk(KERN_ERR "dtlk_read_tts() timeout\n"); 587 printk(KERN_ERR "dtlk_read_tts() timeout\n");
588 588
589 TRACE_RET; 589 TRACE_RET;
@@ -640,7 +640,7 @@ static char dtlk_write_tts(char ch)
640 while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 && 640 while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 &&
641 retries++ < DTLK_MAX_RETRIES) /* DT ready? */ 641 retries++ < DTLK_MAX_RETRIES) /* DT ready? */
642 ; 642 ;
643 if (retries == DTLK_MAX_RETRIES) 643 if (retries > DTLK_MAX_RETRIES)
644 printk(KERN_ERR "dtlk_write_tts() timeout\n"); 644 printk(KERN_ERR "dtlk_write_tts() timeout\n");
645 645
646 outb_p(ch, dtlk_port_tts); /* output to TTS port */ 646 outb_p(ch, dtlk_port_tts); /* output to TTS port */
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c
index 449727b6166d..936d05bf37fa 100644
--- a/drivers/char/hvc_iseries.c
+++ b/drivers/char/hvc_iseries.c
@@ -241,7 +241,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
241static struct vio_driver hvc_vio_driver = { 241static struct vio_driver hvc_vio_driver = {
242 .id_table = hvc_driver_table, 242 .id_table = hvc_driver_table,
243 .probe = hvc_vio_probe, 243 .probe = hvc_vio_probe,
244 .remove = hvc_vio_remove, 244 .remove = __devexit_p(hvc_vio_remove),
245 .driver = { 245 .driver = {
246 .name = hvc_driver_name, 246 .name = hvc_driver_name,
247 .owner = THIS_MODULE, 247 .owner = THIS_MODULE,
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index bd62dc86b47d..c72b994652ac 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -113,7 +113,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
113static struct vio_driver hvc_vio_driver = { 113static struct vio_driver hvc_vio_driver = {
114 .id_table = hvc_driver_table, 114 .id_table = hvc_driver_table,
115 .probe = hvc_vio_probe, 115 .probe = hvc_vio_probe,
116 .remove = hvc_vio_remove, 116 .remove = __devexit_p(hvc_vio_remove),
117 .driver = { 117 .driver = {
118 .name = hvc_driver_name, 118 .name = hvc_driver_name,
119 .owner = THIS_MODULE, 119 .owner = THIS_MODULE,
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
index 7d64e4230e66..266b858b8f85 100644
--- a/drivers/char/hvcs.c
+++ b/drivers/char/hvcs.c
@@ -868,7 +868,7 @@ static int __devexit hvcs_remove(struct vio_dev *dev)
868static struct vio_driver hvcs_vio_driver = { 868static struct vio_driver hvcs_vio_driver = {
869 .id_table = hvcs_driver_table, 869 .id_table = hvcs_driver_table,
870 .probe = hvcs_probe, 870 .probe = hvcs_probe,
871 .remove = hvcs_remove, 871 .remove = __devexit_p(hvcs_remove),
872 .driver = { 872 .driver = {
873 .name = hvcs_driver_name, 873 .name = hvcs_driver_name,
874 .owner = THIS_MODULE, 874 .owner = THIS_MODULE,
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 4d745a89504f..4159292e35cf 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1593,7 +1593,7 @@ static unsigned int card_count;
1593static int __devinit isicom_probe(struct pci_dev *pdev, 1593static int __devinit isicom_probe(struct pci_dev *pdev,
1594 const struct pci_device_id *ent) 1594 const struct pci_device_id *ent)
1595{ 1595{
1596 unsigned int signature, index; 1596 unsigned int uninitialized_var(signature), index;
1597 int retval = -EPERM; 1597 int retval = -EPERM;
1598 struct isi_board *board = NULL; 1598 struct isi_board *board = NULL;
1599 1599
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index e18800c400b1..0c999f5bb3db 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -3785,7 +3785,7 @@ err:
3785 return retval; 3785 return retval;
3786} 3786}
3787 3787
3788static void stli_pciremove(struct pci_dev *pdev) 3788static void __devexit stli_pciremove(struct pci_dev *pdev)
3789{ 3789{
3790 struct stlibrd *brdp = pci_get_drvdata(pdev); 3790 struct stlibrd *brdp = pci_get_drvdata(pdev);
3791 3791
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index f96d0bef855e..afa8813e737a 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -863,59 +863,58 @@ static const struct file_operations kmsg_fops = {
863 .write = kmsg_write, 863 .write = kmsg_write,
864}; 864};
865 865
866static int memory_open(struct inode * inode, struct file * filp) 866static const struct {
867{ 867 unsigned int minor;
868 int ret = 0; 868 char *name;
869 869 umode_t mode;
870 lock_kernel(); 870 const struct file_operations *fops;
871 switch (iminor(inode)) { 871 struct backing_dev_info *dev_info;
872 case 1: 872} devlist[] = { /* list of minor devices */
873 filp->f_op = &mem_fops; 873 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops,
874 filp->f_mapping->backing_dev_info = 874 &directly_mappable_cdev_bdi},
875 &directly_mappable_cdev_bdi;
876 break;
877#ifdef CONFIG_DEVKMEM 875#ifdef CONFIG_DEVKMEM
878 case 2: 876 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops,
879 filp->f_op = &kmem_fops; 877 &directly_mappable_cdev_bdi},
880 filp->f_mapping->backing_dev_info =
881 &directly_mappable_cdev_bdi;
882 break;
883#endif 878#endif
884 case 3: 879 {3, "null", S_IRUGO | S_IWUGO, &null_fops, NULL},
885 filp->f_op = &null_fops;
886 break;
887#ifdef CONFIG_DEVPORT 880#ifdef CONFIG_DEVPORT
888 case 4: 881 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops, NULL},
889 filp->f_op = &port_fops;
890 break;
891#endif 882#endif
892 case 5: 883 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops, &zero_bdi},
893 filp->f_mapping->backing_dev_info = &zero_bdi; 884 {7, "full", S_IRUGO | S_IWUGO, &full_fops, NULL},
894 filp->f_op = &zero_fops; 885 {8, "random", S_IRUGO | S_IWUSR, &random_fops, NULL},
895 break; 886 {9, "urandom", S_IRUGO | S_IWUSR, &urandom_fops, NULL},
896 case 7: 887 {11,"kmsg", S_IRUGO | S_IWUSR, &kmsg_fops, NULL},
897 filp->f_op = &full_fops;
898 break;
899 case 8:
900 filp->f_op = &random_fops;
901 break;
902 case 9:
903 filp->f_op = &urandom_fops;
904 break;
905 case 11:
906 filp->f_op = &kmsg_fops;
907 break;
908#ifdef CONFIG_CRASH_DUMP 888#ifdef CONFIG_CRASH_DUMP
909 case 12: 889 {12,"oldmem", S_IRUSR | S_IWUSR | S_IRGRP, &oldmem_fops, NULL},
910 filp->f_op = &oldmem_fops;
911 break;
912#endif 890#endif
913 default: 891};
914 unlock_kernel(); 892
915 return -ENXIO; 893static int memory_open(struct inode *inode, struct file *filp)
894{
895 int ret = 0;
896 int i;
897
898 lock_kernel();
899
900 for (i = 0; i < ARRAY_SIZE(devlist); i++) {
901 if (devlist[i].minor == iminor(inode)) {
902 filp->f_op = devlist[i].fops;
903 if (devlist[i].dev_info) {
904 filp->f_mapping->backing_dev_info =
905 devlist[i].dev_info;
906 }
907
908 break;
909 }
916 } 910 }
917 if (filp->f_op && filp->f_op->open) 911
918 ret = filp->f_op->open(inode,filp); 912 if (i == ARRAY_SIZE(devlist))
913 ret = -ENXIO;
914 else
915 if (filp->f_op && filp->f_op->open)
916 ret = filp->f_op->open(inode, filp);
917
919 unlock_kernel(); 918 unlock_kernel();
920 return ret; 919 return ret;
921} 920}
@@ -924,30 +923,6 @@ static const struct file_operations memory_fops = {
924 .open = memory_open, /* just a selector for the real open */ 923 .open = memory_open, /* just a selector for the real open */
925}; 924};
926 925
927static const struct {
928 unsigned int minor;
929 char *name;
930 umode_t mode;
931 const struct file_operations *fops;
932} devlist[] = { /* list of minor devices */
933 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
934#ifdef CONFIG_DEVKMEM
935 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
936#endif
937 {3, "null", S_IRUGO | S_IWUGO, &null_fops},
938#ifdef CONFIG_DEVPORT
939 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
940#endif
941 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
942 {7, "full", S_IRUGO | S_IWUGO, &full_fops},
943 {8, "random", S_IRUGO | S_IWUSR, &random_fops},
944 {9, "urandom", S_IRUGO | S_IWUSR, &urandom_fops},
945 {11,"kmsg", S_IRUGO | S_IWUSR, &kmsg_fops},
946#ifdef CONFIG_CRASH_DUMP
947 {12,"oldmem", S_IRUSR | S_IWUSR | S_IRGRP, &oldmem_fops},
948#endif
949};
950
951static struct class *mem_class; 926static struct class *mem_class;
952 927
953static int __init chr_dev_init(void) 928static int __init chr_dev_init(void)
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 65b6ff2442c6..6799588b0099 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -1189,6 +1189,11 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
1189 return -ENODEV; 1189 return -ENODEV;
1190 } 1190 }
1191 1191
1192 if (port % MAX_PORTS_PER_BOARD >= brd->numPorts) {
1193 retval = -ENODEV;
1194 goto out_unlock;
1195 }
1196
1192 ch = &brd->ports[port % MAX_PORTS_PER_BOARD]; 1197 ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
1193 ch->port.count++; 1198 ch->port.count++;
1194 tty->driver_data = ch; 1199 tty->driver_data = ch;
@@ -1213,8 +1218,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
1213 moxa_close_port(tty); 1218 moxa_close_port(tty);
1214 } else 1219 } else
1215 ch->port.flags |= ASYNC_NORMAL_ACTIVE; 1220 ch->port.flags |= ASYNC_NORMAL_ACTIVE;
1221out_unlock:
1216 mutex_unlock(&moxa_openlock); 1222 mutex_unlock(&moxa_openlock);
1217
1218 return retval; 1223 return retval;
1219} 1224}
1220 1225
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index c84c34fb1231..432655bcb04c 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -114,8 +114,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
114 114
115 if (!(pp->flags & PP_CLAIMED)) { 115 if (!(pp->flags & PP_CLAIMED)) {
116 /* Don't have the port claimed */ 116 /* Don't have the port claimed */
117 printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", 117 pr_debug(CHRDEV "%x: claim the port first\n", minor);
118 minor);
119 return -EINVAL; 118 return -EINVAL;
120 } 119 }
121 120
@@ -198,8 +197,7 @@ static ssize_t pp_write (struct file * file, const char __user * buf,
198 197
199 if (!(pp->flags & PP_CLAIMED)) { 198 if (!(pp->flags & PP_CLAIMED)) {
200 /* Don't have the port claimed */ 199 /* Don't have the port claimed */
201 printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", 200 pr_debug(CHRDEV "%x: claim the port first\n", minor);
202 minor);
203 return -EINVAL; 201 return -EINVAL;
204 } 202 }
205 203
@@ -313,7 +311,7 @@ static int register_device (int minor, struct pp_struct *pp)
313 } 311 }
314 312
315 pp->pdev = pdev; 313 pp->pdev = pdev;
316 printk (KERN_DEBUG "%s: registered pardevice\n", name); 314 pr_debug("%s: registered pardevice\n", name);
317 return 0; 315 return 0;
318} 316}
319 317
@@ -343,8 +341,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
343 int ret; 341 int ret;
344 342
345 if (pp->flags & PP_CLAIMED) { 343 if (pp->flags & PP_CLAIMED) {
346 printk (KERN_DEBUG CHRDEV 344 pr_debug(CHRDEV "%x: you've already got it!\n", minor);
347 "%x: you've already got it!\n", minor);
348 return -EINVAL; 345 return -EINVAL;
349 } 346 }
350 347
@@ -379,7 +376,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
379 } 376 }
380 case PPEXCL: 377 case PPEXCL:
381 if (pp->pdev) { 378 if (pp->pdev) {
382 printk (KERN_DEBUG CHRDEV "%x: too late for PPEXCL; " 379 pr_debug(CHRDEV "%x: too late for PPEXCL; "
383 "already registered\n", minor); 380 "already registered\n", minor);
384 if (pp->flags & PP_EXCL) 381 if (pp->flags & PP_EXCL)
385 /* But it's not really an error. */ 382 /* But it's not really an error. */
@@ -491,8 +488,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
491 /* Everything else requires the port to be claimed, so check 488 /* Everything else requires the port to be claimed, so check
492 * that now. */ 489 * that now. */
493 if ((pp->flags & PP_CLAIMED) == 0) { 490 if ((pp->flags & PP_CLAIMED) == 0) {
494 printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", 491 pr_debug(CHRDEV "%x: claim the port first\n", minor);
495 minor);
496 return -EINVAL; 492 return -EINVAL;
497 } 493 }
498 494
@@ -624,8 +620,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
624 return 0; 620 return 0;
625 621
626 default: 622 default:
627 printk (KERN_DEBUG CHRDEV "%x: What? (cmd=0x%x)\n", minor, 623 pr_debug(CHRDEV "%x: What? (cmd=0x%x)\n", minor, cmd);
628 cmd);
629 return -EINVAL; 624 return -EINVAL;
630 } 625 }
631 626
@@ -698,9 +693,8 @@ static int pp_release (struct inode * inode, struct file * file)
698 } 693 }
699 if (compat_negot) { 694 if (compat_negot) {
700 parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT); 695 parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT);
701 printk (KERN_DEBUG CHRDEV 696 pr_debug(CHRDEV "%x: negotiated back to compatibility "
702 "%x: negotiated back to compatibility mode because " 697 "mode because user-space forgot\n", minor);
703 "user-space forgot\n", minor);
704 } 698 }
705 699
706 if (pp->flags & PP_CLAIMED) { 700 if (pp->flags & PP_CLAIMED) {
@@ -713,7 +707,7 @@ static int pp_release (struct inode * inode, struct file * file)
713 info->phase = pp->saved_state.phase; 707 info->phase = pp->saved_state.phase;
714 parport_release (pp->pdev); 708 parport_release (pp->pdev);
715 if (compat_negot != 1) { 709 if (compat_negot != 1) {
716 printk (KERN_DEBUG CHRDEV "%x: released pardevice " 710 pr_debug(CHRDEV "%x: released pardevice "
717 "because user-space forgot\n", minor); 711 "because user-space forgot\n", minor);
718 } 712 }
719 } 713 }
@@ -723,8 +717,7 @@ static int pp_release (struct inode * inode, struct file * file)
723 parport_unregister_device (pp->pdev); 717 parport_unregister_device (pp->pdev);
724 kfree (name); 718 kfree (name);
725 pp->pdev = NULL; 719 pp->pdev = NULL;
726 printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n", 720 pr_debug(CHRDEV "%x: unregistered pardevice\n", minor);
727 minor);
728 } 721 }
729 722
730 kfree (pp); 723 kfree (pp);
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 39a05b5fa9cb..0db35857e4d8 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -121,20 +121,17 @@ static struct sysrq_key_op sysrq_unraw_op = {
121#define sysrq_unraw_op (*(struct sysrq_key_op *)0) 121#define sysrq_unraw_op (*(struct sysrq_key_op *)0)
122#endif /* CONFIG_VT */ 122#endif /* CONFIG_VT */
123 123
124#ifdef CONFIG_KEXEC 124static void sysrq_handle_crash(int key, struct tty_struct *tty)
125static void sysrq_handle_crashdump(int key, struct tty_struct *tty)
126{ 125{
127 crash_kexec(get_irq_regs()); 126 char *killer = NULL;
127 *killer = 1;
128} 128}
129static struct sysrq_key_op sysrq_crashdump_op = { 129static struct sysrq_key_op sysrq_crashdump_op = {
130 .handler = sysrq_handle_crashdump, 130 .handler = sysrq_handle_crash,
131 .help_msg = "Crashdump", 131 .help_msg = "Crash",
132 .action_msg = "Trigger a crashdump", 132 .action_msg = "Trigger a crash",
133 .enable_mask = SYSRQ_ENABLE_DUMP, 133 .enable_mask = SYSRQ_ENABLE_DUMP,
134}; 134};
135#else
136#define sysrq_crashdump_op (*(struct sysrq_key_op *)0)
137#endif
138 135
139static void sysrq_handle_reboot(int key, struct tty_struct *tty) 136static void sysrq_handle_reboot(int key, struct tty_struct *tty)
140{ 137{