#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"
#include "mct_u232.h"
-
/*
* Version Information
*/
static int write_blocking; /* disabled by default */
#endif
+static int debug;
+
/*
* Function prototypes
*/
while (count > 0) {
size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
- usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, size, buf);
if (from_user) {
if (copy_from_user(port->write_urb->transfer_buffer, buf, size)) {
return;
}
- usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
/*
* Work-a-round: handle the 'usual' bulk-in pipe here
MODULE_LICENSE("GPL");
#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
-MODULE_PARM(write_blocking, "i");
+module_param(write_blocking, int, 0);
MODULE_PARM_DESC(write_blocking,
"The write function will block to write out all data");
#endif
-MODULE_PARM(debug, "i");
+module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not");