]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/synclink_gt.c
Merge branch 'wmi-fix' into release-2.6.27
[linux-2.6-omap-h63xx.git] / drivers / char / synclink_gt.c
index 5ffdb364ea4093cec29ff306779ebdc77ff11ab4..08911ed6649470d24e840d781e7bc2366bcd2dd6 100644 (file)
@@ -47,7 +47,6 @@
 
 
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -128,17 +127,14 @@ static int slgt_device_count;
 static int ttymajor;
 static int debug_level;
 static int maxframe[MAX_DEVICES];
-static int dosyncppp[MAX_DEVICES];
 
 module_param(ttymajor, int, 0);
 module_param(debug_level, int, 0);
 module_param_array(maxframe, int, NULL, 0);
-module_param_array(dosyncppp, int, NULL, 0);
 
 MODULE_PARM_DESC(ttymajor, "TTY major device number override: 0=auto assigned");
 MODULE_PARM_DESC(debug_level, "Debug syslog output: 0=disabled, 1 to 5=increasing detail");
 MODULE_PARM_DESC(maxframe, "Maximum frame size used by device (4096 to 65535)");
-MODULE_PARM_DESC(dosyncppp, "Enable synchronous net device, 0=disable 1=enable");
 
 /*
  * tty support and callbacks
@@ -349,7 +345,6 @@ struct slgt_info {
        /* SPPP/Cisco HDLC device parts */
 
        int netcount;
-       int dosyncppp;
        spinlock_t netlock;
 #if SYNCLINK_GENERIC_HDLC
        struct net_device *netdev;
@@ -2686,8 +2681,10 @@ static int rx_enable(struct slgt_info *info, int enable)
         */
        rbuf_fill_level = ((unsigned int)enable) >> 16;
        if (rbuf_fill_level) {
-               if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4))
+               if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4)) {
+                       spin_unlock_irqrestore(&info->lock, flags);
                        return -EINVAL;
+               }
                info->rbuf_fill_level = rbuf_fill_level;
                rx_stop(info); /* restart receiver to use new fill level */
        }
@@ -3403,7 +3400,6 @@ static void add_device(struct slgt_info *info)
        if (info->line < MAX_DEVICES) {
                if (maxframe[info->line])
                        info->max_frame_size = maxframe[info->line];
-               info->dosyncppp = dosyncppp[info->line];
        }
 
        slgt_device_count++;