VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / usb / serial / ir-usb.c
index 0adcbb1..cb42cc7 100644 (file)
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-
-#ifdef CONFIG_USB_SERIAL_DEBUG
-       static int debug = 1;
-#else
-       static int debug;
-#endif
-
 #include "usb-serial.h"
 
 /*
@@ -101,9 +94,11 @@ struct irda_class_desc {
        u8      bMaxUnicastList;
 } __attribute__ ((packed));
 
+static int debug;
+
 /* if overridden by the user, then use their value for the size of the read and
  * write urbs */
-static int buffer_size = 0;
+static int buffer_size;
 /* if overridden by the user, then use the specified number of XBOFs */
 static int xbof = -1;
 
@@ -404,7 +399,8 @@ static void ir_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
        }
 
        usb_serial_debug_data (
-               __FILE__,
+               debug,
+               &port->dev,
                __FUNCTION__,
                urb->actual_length,
                urb->transfer_buffer);
@@ -439,7 +435,8 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
                                ir_baud = *data & 0x0f;
 
                        usb_serial_debug_data (
-                               __FILE__,
+                               debug,
+                               &port->dev,
                                __FUNCTION__,
                                urb->actual_length,
                                data);
@@ -614,10 +611,10 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
+module_param(debug, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Debug enabled or not");
-MODULE_PARM(xbof, "i");
+module_param(xbof, int, 0);
 MODULE_PARM_DESC(xbof, "Force specific number of XBOFs");
-MODULE_PARM(buffer_size, "i");
+module_param(buffer_size, int, 0);
 MODULE_PARM_DESC(buffer_size, "Size of the transfer buffers");