aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pcmcia')
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.c20
-rw-r--r--drivers/char/pcmcia/synclink_cs.c4
2 files changed, 10 insertions, 14 deletions
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
index b1414507997c..569f2f7743a7 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -29,7 +29,6 @@
29#include <linux/tty_driver.h> 29#include <linux/tty_driver.h>
30#include <linux/tty_flip.h> 30#include <linux/tty_flip.h>
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32#include <linux/version.h>
33 32
34#include "tty.h" 33#include "tty.h"
35#include "network.h" 34#include "network.h"
@@ -277,6 +276,7 @@ static int ipw_write_room(struct tty_struct *linux_tty)
277 struct ipw_tty *tty = linux_tty->driver_data; 276 struct ipw_tty *tty = linux_tty->driver_data;
278 int room; 277 int room;
279 278
279 /* FIXME: Exactly how is the tty object locked here .. */
280 if (!tty) 280 if (!tty)
281 return -ENODEV; 281 return -ENODEV;
282 282
@@ -398,6 +398,7 @@ static int set_control_lines(struct ipw_tty *tty, unsigned int set,
398static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file) 398static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file)
399{ 399{
400 struct ipw_tty *tty = linux_tty->driver_data; 400 struct ipw_tty *tty = linux_tty->driver_data;
401 /* FIXME: Exactly how is the tty object locked here .. */
401 402
402 if (!tty) 403 if (!tty)
403 return -ENODEV; 404 return -ENODEV;
@@ -413,6 +414,7 @@ ipw_tiocmset(struct tty_struct *linux_tty, struct file *file,
413 unsigned int set, unsigned int clear) 414 unsigned int set, unsigned int clear)
414{ 415{
415 struct ipw_tty *tty = linux_tty->driver_data; 416 struct ipw_tty *tty = linux_tty->driver_data;
417 /* FIXME: Exactly how is the tty object locked here .. */
416 418
417 if (!tty) 419 if (!tty)
418 return -ENODEV; 420 return -ENODEV;
@@ -434,6 +436,8 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
434 if (!tty->open_count) 436 if (!tty->open_count)
435 return -EINVAL; 437 return -EINVAL;
436 438
439 /* FIXME: Exactly how is the tty object locked here .. */
440
437 switch (cmd) { 441 switch (cmd) {
438 case TIOCGSERIAL: 442 case TIOCGSERIAL:
439 return ipwireless_get_serial_info(tty, (void __user *) arg); 443 return ipwireless_get_serial_info(tty, (void __user *) arg);
@@ -468,13 +472,6 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
468 } 472 }
469 return 0; 473 return 0;
470 474
471 case TCGETS:
472 case TCGETA:
473 return n_tty_ioctl(linux_tty, file, cmd, arg);
474
475 case TCFLSH:
476 return n_tty_ioctl(linux_tty, file, cmd, arg);
477
478 case FIONREAD: 475 case FIONREAD:
479 { 476 {
480 int val = 0; 477 int val = 0;
@@ -483,10 +480,11 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
483 return -EFAULT; 480 return -EFAULT;
484 } 481 }
485 return 0; 482 return 0;
483 case TCFLSH:
484 return tty_perform_flush(linux_tty, arg);
486 } 485 }
487 } 486 }
488 487 return tty_mode_ioctl(linux_tty, file, cmd , arg);
489 return -ENOIOCTLCMD;
490} 488}
491 489
492static int add_tty(dev_node_t *nodesp, int j, 490static int add_tty(dev_node_t *nodesp, int j,
@@ -589,6 +587,8 @@ void ipwireless_tty_free(struct ipw_tty *tty)
589 tty_hangup(ttyj->linux_tty); 587 tty_hangup(ttyj->linux_tty);
590 /* Wait till the tty_hangup has completed */ 588 /* Wait till the tty_hangup has completed */
591 flush_scheduled_work(); 589 flush_scheduled_work();
590 /* FIXME: Exactly how is the tty object locked here
591 against a parallel ioctl etc */
592 mutex_lock(&ttyj->ipw_tty_mutex); 592 mutex_lock(&ttyj->ipw_tty_mutex);
593 } 593 }
594 while (ttyj->open_count) 594 while (ttyj->open_count)
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 05bf9c55ecc2..9a626e50b793 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -232,7 +232,6 @@ typedef struct _mgslpc_info {
232 232
233 /* SPPP/Cisco HDLC device parts */ 233 /* SPPP/Cisco HDLC device parts */
234 int netcount; 234 int netcount;
235 int dosyncppp;
236 spinlock_t netlock; 235 spinlock_t netlock;
237 236
238#if SYNCLINK_GENERIC_HDLC 237#if SYNCLINK_GENERIC_HDLC
@@ -459,13 +458,11 @@ static int ttymajor=0;
459 458
460static int debug_level = 0; 459static int debug_level = 0;
461static int maxframe[MAX_DEVICE_COUNT] = {0,}; 460static int maxframe[MAX_DEVICE_COUNT] = {0,};
462static int dosyncppp[MAX_DEVICE_COUNT] = {1,1,1,1};
463 461
464module_param(break_on_load, bool, 0); 462module_param(break_on_load, bool, 0);
465module_param(ttymajor, int, 0); 463module_param(ttymajor, int, 0);
466module_param(debug_level, int, 0); 464module_param(debug_level, int, 0);
467module_param_array(maxframe, int, NULL, 0); 465module_param_array(maxframe, int, NULL, 0);
468module_param_array(dosyncppp, int, NULL, 0);
469 466
470MODULE_LICENSE("GPL"); 467MODULE_LICENSE("GPL");
471 468
@@ -2915,7 +2912,6 @@ static void mgslpc_add_device(MGSLPC_INFO *info)
2915 if (info->line < MAX_DEVICE_COUNT) { 2912 if (info->line < MAX_DEVICE_COUNT) {
2916 if (maxframe[info->line]) 2913 if (maxframe[info->line])
2917 info->max_frame_size = maxframe[info->line]; 2914 info->max_frame_size = maxframe[info->line];
2918 info->dosyncppp = dosyncppp[info->line];
2919 } 2915 }
2920 2916
2921 mgslpc_device_count++; 2917 mgslpc_device_count++;