git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
drivers
/
usb
/
serial
/
mct_u232.c
diff --git
a/drivers/usb/serial/mct_u232.c
b/drivers/usb/serial/mct_u232.c
index
b6f2053
..
b4961f0
100644
(file)
--- a/
drivers/usb/serial/mct_u232.c
+++ b/
drivers/usb/serial/mct_u232.c
@@
-76,17
+76,9
@@
#include <linux/spinlock.h>
#include <asm/uaccess.h>
#include <linux/usb.h>
#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"
#include "usb-serial.h"
#include "mct_u232.h"
-
/*
* Version Information
*/
/*
* Version Information
*/
@@
-105,6
+97,8
@@
static int write_blocking; /* disabled by default */
#endif
static int write_blocking; /* disabled by default */
#endif
+static int debug;
+
/*
* Function prototypes
*/
/*
* Function prototypes
*/
@@
-523,7
+517,7
@@
static int mct_u232_write (struct usb_serial_port *port, int from_user,
while (count > 0) {
size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
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)) {
if (from_user) {
if (copy_from_user(port->write_urb->transfer_buffer, buf, size)) {
@@
-631,7
+625,7
@@
static void mct_u232_read_int_callback (struct urb *urb, struct pt_regs *regs)
return;
}
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
/*
* Work-a-round: handle the 'usual' bulk-in pipe here
@@
-912,11
+906,11
@@
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_LICENSE("GPL");
#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
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_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");
MODULE_PARM_DESC(debug, "Debug enabled or not");