#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 "visor.h"
static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_id *id);
/* Parameters that may be passed into the module. */
+static int debug;
static __u16 vendor;
static __u16 product;
memcpy (buffer, buf, count);
}
- usb_serial_debug_data (__FILE__, __FUNCTION__, count, buffer);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
usb_fill_bulk_urb (urb, serial->dev,
usb_sndbulkpipe (serial->dev,
return;
}
- usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
tty = port->tty;
if (tty && urb->actual_length) {
static void visor_read_int_callback (struct urb *urb, struct pt_regs *regs)
{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
int result;
switch (urb->status) {
* Rumor has it this endpoint is used to notify when data
* is ready to be read from the bulk ones.
*/
- usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length,
- urb->transfer_buffer);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+ urb->actual_length, urb->transfer_buffer);
exit:
result = usb_submit_urb (urb, GFP_ATOMIC);
dev_err(dev, "%s - error %d getting connection info\n",
__FUNCTION__, retval);
else
- usb_serial_debug_data (__FILE__, __FUNCTION__, retval, transfer_buffer);
+ usb_serial_debug_data(debug, &serial->dev->dev, __FUNCTION__,
+ retval, transfer_buffer);
kfree (transfer_buffer);
return 0;