X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fdigi_acceleport.c;h=f187b3165d57d666804812e340b350b10278147c;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=29a8140e46b047465daf18e57e9eb78b3fe5eae9;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 29a8140e4..f187b3165 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -246,16 +246,8 @@ #include #include #include - -#ifdef CONFIG_USB_SERIAL_DEBUG - static int debug = 1; -#else - static int debug; -#endif - #include "usb-serial.h" - /* Defines */ /* @@ -480,6 +472,8 @@ static int digi_read_oob_callback( struct urb *urb ); /* Statics */ +static int debug; + static struct usb_device_id id_table_combined [] = { { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) }, { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) }, @@ -1396,11 +1390,6 @@ dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status ); return; } - /* further sanity checks */ - if( port_paranoia_check( port, __FUNCTION__ ) - || serial_paranoia_check( serial, __FUNCTION__ ) ) - return; - /* try to send any buffered data on this port, if it is open */ spin_lock( &priv->dp_port_lock ); priv->dp_write_urb_in_use = 0; @@ -1798,7 +1787,6 @@ dbg( "digi_read_bulk_callback: TOP" ); return; } if( port->serial == NULL - || serial_paranoia_check( port->serial, __FUNCTION__ ) || (serial_priv=usb_get_serial_data(port->serial)) == NULL ) { err("%s: serial is bad or serial->private is NULL, status=%d", __FUNCTION__, urb->status ); return; @@ -1851,11 +1839,6 @@ static int digi_read_inb_callback( struct urb *urb ) unsigned char *data = ((unsigned char *)urb->transfer_buffer)+3; int flag,throttled; - - /* sanity check */ - if( port_paranoia_check( port, __FUNCTION__ ) ) - return( -1 ); - /* do not process callbacks on closed ports */ /* but do continue the read chain */ if( port->open_count == 0 ) @@ -1980,9 +1963,8 @@ opcode, line, status, val ); port = serial->port[line]; - if( port_paranoia_check( port, __FUNCTION__ ) - || (priv=usb_get_serial_port_data(port)) == NULL ) - return( -1 ); + if ((priv=usb_get_serial_port_data(port)) == NULL ) + return -1; if( opcode == DIGI_CMD_READ_INPUT_SIGNALS ) { @@ -2080,6 +2062,5 @@ 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"); -