Commit 8d99c8a3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: drivers/usb/serial/ fixups due to dev_printk change

parent 8b1601ab
......@@ -66,7 +66,7 @@ static int usb_serial_device_probe (struct device *dev)
driver = port->serial->type;
if (driver->port_probe) {
if (!try_module_get(driver->owner)) {
dev_err(*dev, "module get failed, exiting\n");
dev_err(dev, "module get failed, exiting\n");
retval = -EIO;
goto exit;
}
......@@ -79,7 +79,8 @@ static int usb_serial_device_probe (struct device *dev)
minor = port->number;
tty_register_device (&usb_serial_tty_driver, minor);
dev_info(*dev, "%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
dev_info(&port->serial->dev->dev,
"%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
driver->name, minor, minor);
exit:
......@@ -101,7 +102,7 @@ static int usb_serial_device_remove (struct device *dev)
driver = port->serial->type;
if (driver->port_remove) {
if (!try_module_get(driver->owner)) {
dev_err(*dev, "module get failed, exiting\n");
dev_err(dev, "module get failed, exiting\n");
retval = -EIO;
goto exit;
}
......@@ -111,7 +112,7 @@ static int usb_serial_device_remove (struct device *dev)
exit:
minor = port->number;
tty_unregister_device (&usb_serial_tty_driver, minor);
dev_info(*dev, "%s converter now disconnected from ttyUSB%d\n",
dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
driver->name, minor);
return retval;
......
......@@ -181,7 +181,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
return result;
}
......@@ -205,7 +205,7 @@ static void empeg_close (struct usb_serial_port *port, struct file * filp)
usb_unlink_urb (port->read_urb);
}
/* Uncomment the following line if you want to see some statistics in your syslog */
/* dev_info (port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
/* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
}
......@@ -248,7 +248,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
if (urb->transfer_buffer == NULL) {
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
if (urb->transfer_buffer == NULL) {
dev_err(port->dev, "%s no more kernel memory...\n", __FUNCTION__);
dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__);
goto exit;
}
}
......@@ -278,7 +278,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
/* send it down the pipe */
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
bytes_sent = status;
break;
}
......@@ -426,7 +426,7 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return;
......@@ -451,7 +451,7 @@ static void empeg_unthrottle (struct usb_serial_port *port)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
return;
}
......
......@@ -41,7 +41,7 @@ int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *da
transfer_buffer = kmalloc (length, GFP_KERNEL);
if (!transfer_buffer) {
dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
return -ENOMEM;
}
memcpy (transfer_buffer, data, length);
......@@ -56,7 +56,7 @@ int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
dbg("%s - %d", __FUNCTION__, reset_bit);
response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
if (response < 0) {
dev_err(serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
dev_err(&serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
}
return response;
}
......
......@@ -106,7 +106,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp)
port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
}
return result;
......@@ -176,7 +176,7 @@ int usb_serial_generic_write (struct usb_serial_port *port, int from_user, const
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = count;
......@@ -266,7 +266,7 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg
usb_serial_generic_read_bulk_callback), port);
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
}
void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
......
......@@ -572,7 +572,7 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
record = (struct edge_firmware_image_record *)firmware;
response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
if (response < 0) {
dev_err(edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
break;
}
firmware += sizeof (struct edge_firmware_image_record) + record->Len;
......@@ -840,7 +840,7 @@ static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs)
exit:
result = usb_submit_urb (urb, GFP_ATOMIC);
if (result) {
dev_err(urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
dev_err(&urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
}
}
......@@ -889,7 +889,7 @@ static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs)
edge_serial->read_urb->dev = edge_serial->serial->dev;
status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
if (status) {
dev_err(urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
}
}
}
......@@ -1057,7 +1057,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
* this interrupt will continue as long as the edgeport is connected */
response = usb_submit_urb (edge_serial->interrupt_read_urb, GFP_KERNEL);
if (response) {
dev_err(port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response);
dev_err(&port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response);
}
}
......@@ -1081,7 +1081,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
if (response < 0) {
dev_err(port->dev, "%s - error sending open port command\n", __FUNCTION__);
dev_err(&port->dev, "%s - error sending open port command\n", __FUNCTION__);
edge_port->openPending = FALSE;
return -ENODEV;
}
......@@ -1450,7 +1450,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
count = fifo->count;
buffer = kmalloc (count+2, GFP_ATOMIC);
if (buffer == NULL) {
dev_err(edge_serial->serial->dev->dev, "%s - no more kernel memory...\n", __FUNCTION__);
dev_err(&edge_serial->serial->dev->dev, "%s - no more kernel memory...\n", __FUNCTION__);
edge_port->write_in_progress = FALSE;
return;
}
......@@ -2143,7 +2143,7 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
}
edge_port = usb_get_serial_port_data(port);
if (edge_port == NULL) {
dev_err(edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort);
dev_err(&edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort);
return;
}
......@@ -2330,7 +2330,7 @@ static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u
transfer_buffer = kmalloc (64, GFP_KERNEL);
if (!transfer_buffer) {
dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
return -ENOMEM;
}
......@@ -2375,7 +2375,7 @@ static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u1
transfer_buffer = kmalloc (64, GFP_KERNEL);
if (!transfer_buffer) {
dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
return -ENOMEM;
}
......@@ -2420,7 +2420,7 @@ static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16
transfer_buffer = kmalloc (64, GFP_KERNEL);
if (!transfer_buffer) {
dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
return -ENOMEM;
}
......@@ -2463,7 +2463,7 @@ static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u
buffer = kmalloc (10, GFP_ATOMIC);
if (!buffer) {
dev_err(edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
return -ENOMEM;
}
......@@ -2554,14 +2554,14 @@ static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRa
status = calc_baud_rate_divisor (baudRate, &divisor);
if (status) {
dev_err(edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
dev_err(&edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
return status;
}
// Alloc memory for the string of commands.
cmdBuffer = kmalloc (0x100, GFP_ATOMIC);
if (!cmdBuffer) {
dev_err(edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
return -ENOMEM;
}
currCmd = cmdBuffer;
......@@ -2838,7 +2838,7 @@ static void get_manufacturing_desc (struct edgeport_serial *edge_serial)
(__u8 *)(&edge_serial->manuf_descriptor));
if (response < 1) {
dev_err(edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
dev_err(&edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
} else {
char string[30];
dbg("**Manufacturer Descriptor");
......@@ -2877,7 +2877,7 @@ static void get_boot_desc (struct edgeport_serial *edge_serial)
(__u8 *)(&edge_serial->boot_descriptor));
if (response < 1) {
dev_err(edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
dev_err(&edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
} else {
dbg("**Boot Descriptor:");
dbg(" BootCodeLength: %d", edge_serial->boot_descriptor.BootCodeLength);
......@@ -2938,7 +2938,7 @@ static void load_application_firmware (struct edgeport_serial *edge_serial)
record = (struct edge_firmware_image_record *)firmware;
response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
if (response < 0) {
dev_err(edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
break;
}
firmware += sizeof (struct edge_firmware_image_record) + record->Len;
......@@ -2974,7 +2974,7 @@ static int edge_startup (struct usb_serial *serial)
/* create our private serial structure */
edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
if (edge_serial == NULL) {
dev_err(serial->dev->dev, "%s - Out of memory", __FUNCTION__);
dev_err(&serial->dev->dev, "%s - Out of memory", __FUNCTION__);
return -ENOMEM;
}
memset (edge_serial, 0, sizeof(struct edgeport_serial));
......@@ -2988,7 +2988,7 @@ static int edge_startup (struct usb_serial *serial)
get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]);
dev_info(serial->dev->dev, "%s detected\n", edge_serial->name);
dev_info(&serial->dev->dev, "%s detected\n", edge_serial->name);
/* get the manufacturing descriptor for this device */
get_manufacturing_desc (edge_serial);
......@@ -3030,7 +3030,7 @@ static int edge_startup (struct usb_serial *serial)
for (i = 0; i < serial->num_ports; ++i) {
edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
if (edge_port == NULL) {
dev_err(serial->dev->dev, "%s - Out of memory", __FUNCTION__);
dev_err(&serial->dev->dev, "%s - Out of memory", __FUNCTION__);
usb_set_serial_data(serial, NULL);
kfree(edge_serial);
return -ENOMEM;
......
This diff is collapsed.
......@@ -243,7 +243,7 @@ static int ir_startup (struct usb_serial *serial)
irda_desc = irda_usb_find_class_desc (serial->dev, 0);
if (irda_desc == NULL) {
dev_err (serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
dev_err (&serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
return -ENODEV;
}
......@@ -291,7 +291,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
/* override the default buffer sizes */
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__);
dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
return -ENOMEM;
}
kfree (port->read_urb->transfer_buffer);
......@@ -300,7 +300,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__);
dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
return -ENOMEM;
}
kfree (port->write_urb->transfer_buffer);
......@@ -320,7 +320,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
return result;
}
......@@ -353,7 +353,7 @@ static int ir_write (struct usb_serial_port *port, int from_user, const unsigned
dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count);
if (!port->tty) {
dev_err (port->dev, "%s - no tty???\n", __FUNCTION__);
dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__);
return 0;
}
......@@ -399,7 +399,7 @@ static int ir_write (struct usb_serial_port *port, int from_user, const unsigned
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = transfer_size;
......@@ -504,7 +504,7 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n",
dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
__FUNCTION__, result);
break ;
......@@ -599,7 +599,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct termios *old_te
result = usb_submit_urb (port->write_urb, GFP_KERNEL);
if (result)
dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
}
return;
}
......
......@@ -1035,7 +1035,7 @@ static int keyspan_fake_startup (struct usb_serial *serial)
}
if (record == NULL) {
dev_err(serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
dev_err(&serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
return(1);
}
......@@ -1049,7 +1049,7 @@ static int keyspan_fake_startup (struct usb_serial *serial)
(unsigned char *)record->data,
record->data_size, 0xa0);
if (response < 0) {
dev_err(serial->dev->dev, "ezusb_writememory failed for Keyspan"
dev_err(&serial->dev->dev, "ezusb_writememory failed for Keyspan"
"firmware (%d %04X %p %d)\n",
response,
record->address, record->data, record->data_size);
......@@ -1847,7 +1847,7 @@ static int keyspan_startup (struct usb_serial *serial)
if (d_details->product_id == serial->dev->descriptor.idProduct)
break;
if (d_details == NULL) {
dev_err(serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
return 1;
}
......
......@@ -204,7 +204,7 @@ static int pl2303_write (struct usb_serial_port *port, int from_user, const uns
port->write_urb->dev = port->serial->dev;
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = count;
......@@ -246,7 +246,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
buf = kmalloc (7, GFP_KERNEL);
if (!buf) {
dev_err(port->dev, "%s - out of memory.\n", __FUNCTION__);
dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
return;
}
memset (buf, 0x00, 0x07);
......@@ -294,7 +294,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default:
dev_err(port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
dev_err(&port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
break;
}
dbg("%s - baud = %d", __FUNCTION__, baud);
......@@ -411,7 +411,7 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
port->read_urb->dev = serial->dev;
result = usb_submit_urb (port->read_urb, GFP_KERNEL);
if (result) {
dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
pl2303_close (port, NULL);
return -EPROTO;
}
......@@ -420,7 +420,7 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
port->interrupt_in_urb->dev = serial->dev;
result = usb_submit_urb (port->interrupt_in_urb, GFP_KERNEL);
if (result) {
dev_err(port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
pl2303_close (port, NULL);
return -EPROTO;
}
......@@ -621,7 +621,7 @@ static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs)
exit:
status = usb_submit_urb (urb, GFP_ATOMIC);
if (status)
dev_err(urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
__FUNCTION__, status);
}
......@@ -658,7 +658,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
urb->dev = serial->dev;
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return;
}
dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
......@@ -683,7 +683,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
urb->dev = serial->dev;
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
}
return;
......@@ -712,7 +712,7 @@ static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
port->write_urb->dev = port->serial->dev;
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
dev_err(urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
return;
}
......
......@@ -841,7 +841,7 @@ static struct usb_serial * create_serial (struct usb_device *dev,
serial = kmalloc (sizeof (*serial), GFP_KERNEL);
if (!serial) {
dev_err(dev->dev, "%s - out of memory\n", __FUNCTION__);
dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
return NULL;
}
memset (serial, 0, sizeof(*serial));
......@@ -899,14 +899,14 @@ int usb_serial_probe(struct usb_interface *interface,
serial = create_serial (dev, interface, type);
if (!serial) {
dev_err(interface->dev, "%s - out of memory\n", __FUNCTION__);
dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
return -ENODEV;
}
/* if this device type has a probe function, call it */
if (type->probe) {
if (!try_module_get(type->owner)) {
dev_err(interface->dev, "module get failed, exiting\n");
dev_err(&interface->dev, "module get failed, exiting\n");
kfree (serial);
return -EIO;
}
......@@ -980,7 +980,7 @@ int usb_serial_probe(struct usb_interface *interface,
* properly during a later invocation of usb_serial_probe
*/
if (num_bulk_in == 0 || num_bulk_out == 0) {
dev_info(interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
kfree (serial);
return -ENODEV;
}
......@@ -989,13 +989,13 @@ int usb_serial_probe(struct usb_interface *interface,
#endif
/* found all that we need */
dev_info(interface->dev, "%s converter detected\n", type->name);
dev_info(&interface->dev, "%s converter detected\n", type->name);
#ifdef CONFIG_USB_SERIAL_GENERIC
if (type == &usb_serial_generic_device) {
num_ports = num_bulk_out;
if (num_ports == 0) {
dev_err(interface->dev, "Generic device with no bulk out, not allowed.\n");
dev_err(&interface->dev, "Generic device with no bulk out, not allowed.\n");
kfree (serial);
return -EIO;
}
......@@ -1005,7 +1005,7 @@ int usb_serial_probe(struct usb_interface *interface,
/* if this device type has a calc_num_ports function, call it */
if (type->calc_num_ports) {
if (!try_module_get(type->owner)) {
dev_err(interface->dev, "module get failed, exiting\n");
dev_err(&interface->dev, "module get failed, exiting\n");
kfree (serial);
return -EIO;
}
......@@ -1017,7 +1017,7 @@ int usb_serial_probe(struct usb_interface *interface,
}
if (get_free_serial (serial, num_ports, &minor) == NULL) {
dev_err(interface->dev, "No more free serial devices\n");
dev_err(&interface->dev, "No more free serial devices\n");
kfree (serial);
return -ENOMEM;
}
......@@ -1034,14 +1034,14 @@ int usb_serial_probe(struct usb_interface *interface,
port = &serial->port[i];
port->read_urb = usb_alloc_urb (0, GFP_KERNEL);
if (!port->read_urb) {
dev_err(interface->dev, "No free urbs available\n");
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->bulk_in_buffer) {
dev_err(interface->dev, "Couldn't allocate bulk_in_buffer\n");
dev_err(&interface->dev, "Couldn't allocate bulk_in_buffer\n");
goto probe_error;
}
usb_fill_bulk_urb (port->read_urb, dev,
......@@ -1059,7 +1059,7 @@ int usb_serial_probe(struct usb_interface *interface,
port = &serial->port[i];
port->write_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!port->write_urb) {
dev_err(interface->dev, "No free urbs available\n");
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
......@@ -1067,7 +1067,7 @@ int usb_serial_probe(struct usb_interface *interface,
port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->bulk_out_buffer) {
dev_err(interface->dev, "Couldn't allocate bulk_out_buffer\n");
dev_err(&interface->dev, "Couldn't allocate bulk_out_buffer\n");
goto probe_error;
}
usb_fill_bulk_urb (port->write_urb, dev,
......@@ -1085,14 +1085,14 @@ int usb_serial_probe(struct usb_interface *interface,
port = &serial->port[i];
port->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!port->interrupt_in_urb) {
dev_err(interface->dev, "No free urbs available\n");
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->interrupt_in_buffer) {
dev_err(interface->dev, "Couldn't allocate interrupt_in_buffer\n");
dev_err(&interface->dev, "Couldn't allocate interrupt_in_buffer\n");
goto probe_error;
}
usb_fill_int_urb (port->interrupt_in_urb, dev,
......@@ -1121,7 +1121,7 @@ int usb_serial_probe(struct usb_interface *interface,
/* if this device type has an attach function, call it */
if (type->attach) {
if (!try_module_get(type->owner)) {
dev_err(interface->dev, "module get failed, exiting\n");
dev_err(&interface->dev, "module get failed, exiting\n");
goto probe_error;
}
retval = type->attach (serial);
......@@ -1253,7 +1253,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
/* free up any memory that we allocated */
kfree (serial);
}
dev_info(*dev, "device disconnected\n");
dev_info(dev, "device disconnected\n");
}
......
......@@ -303,7 +303,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
if (!port->read_urb) {
/* this is needed for some brain dead Sony devices */
dev_err(port->dev, "Device lied about number of ports, please use a lower one.\n");
dev_err(&port->dev, "Device lied about number of ports, please use a lower one.\n");
return -ENODEV;
}
......@@ -327,7 +327,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
visor_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) {
dev_err(port->dev, "%s - failed submitting read urb, error %d\n",
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
__FUNCTION__, result);
goto exit;
}
......@@ -336,7 +336,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
dbg("%s - adding interrupt input for treo", __FUNCTION__);
result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (result)
dev_err(port->dev, "%s - failed submitting interrupt urb, error %d\n",
dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
__FUNCTION__, result);
}
exit:
......@@ -363,7 +363,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
* device is still here */
transfer_buffer = kmalloc (0x12, GFP_KERNEL);
if (!transfer_buffer) {
dev_err(port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x12);
dev_err(&port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x12);
} else {
/* send a shutdown message to the device */
usb_control_msg (serial->dev,
......@@ -380,7 +380,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
usb_unlink_urb (port->interrupt_in_urb);
}
/* Uncomment the following line if you want to see some statistics in your syslog */
/* dev_info (port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
/* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
}
......@@ -395,13 +395,13 @@ static int visor_write (struct usb_serial_port *port, int from_user, const unsig
buffer = kmalloc (count, GFP_ATOMIC);
if (!buffer) {
dev_err(port->dev, "out of memory\n");
dev_err(&port->dev, "out of memory\n");
return -ENOMEM;
}
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
dev_err(port->dev, "no more free urbs\n");
dev_err(&port->dev, "no more free urbs\n");
kfree (buffer);
return -ENOMEM;
}
......@@ -427,7 +427,7 @@ static int visor_write (struct usb_serial_port *port, int from_user, const unsig
/* send it down the pipe */
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
__FUNCTION__, status);
count = status;
} else {
......@@ -539,7 +539,7 @@ static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
visor_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return;
}
......@@ -577,7 +577,7 @@ static void visor_read_int_callback (struct urb *urb, struct pt_regs *regs)
exit:
result = usb_submit_urb (urb, GFP_ATOMIC);
if (result)
dev_err(urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
__FUNCTION__, result);
}
......@@ -597,7 +597,7 @@ static void visor_unthrottle (struct usb_serial_port *port)
port->read_urb->dev = port->serial->dev;
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
}
static int visor_probe (struct usb_serial *serial)
......@@ -609,7 +609,7 @@ static int visor_probe (struct usb_serial *serial)
unsigned char *transfer_buffer = kmalloc (256, GFP_KERNEL);
if (!transfer_buffer) {
dev_err(*dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 256);
dev_err(dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 256);
return -ENOMEM;
}
......@@ -622,14 +622,14 @@ static int visor_probe (struct usb_serial *serial)
response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
if (response < 0) {
dev_err(*dev, "%s - error getting connection information\n", __FUNCTION__);
dev_err(dev, "%s - error getting connection information\n", __FUNCTION__);
} else {
struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
char *string;
le16_to_cpus(&connection_info->num_ports);
num_ports = connection_info->num_ports;
dev_info(*dev, "%s: Number of ports: %d\n", serial->type->name, connection_info->num_ports);
dev_info(dev, "%s: Number of ports: %d\n", serial->type->name, connection_info->num_ports);
for (i = 0; i < num_ports; ++i) {
switch (connection_info->connections[i].port_function_id) {
case VISOR_FUNCTION_GENERIC:
......@@ -651,7 +651,7 @@ static int visor_probe (struct usb_serial *serial)
string = "unknown";
break;
}
dev_info(*dev, "%s: port %d, is for %s use\n", serial->type->name,
dev_info(dev, "%s: port %d, is for %s use\n", serial->type->name,
connection_info->connections[i].port, string);
/* save off our num_ports info so that we can use it in the calc_num_ports call */
usb_set_serial_data(serial, (void *)(long)num_ports);
......@@ -667,7 +667,7 @@ static int visor_probe (struct usb_serial *serial)
0xc2, 0x0000, 0x0000, transfer_buffer,
0x14, 300);
if (response < 0) {
dev_err(*dev, "%s - error getting first unknown palm command\n", __FUNCTION__);
dev_err(dev, "%s - error getting first unknown palm command\n", __FUNCTION__);
} else {
usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
}
......@@ -676,7 +676,7 @@ static int visor_probe (struct usb_serial *serial)
0xc2, 0x0000, 0x0000, transfer_buffer,
0x14, 300);
if (response < 0) {
dev_err(*dev, "%s - error getting second unknown palm command\n", __FUNCTION__);
dev_err(dev, "%s - error getting second unknown palm command\n", __FUNCTION__);
} else {
usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
}
......@@ -686,7 +686,7 @@ static int visor_probe (struct usb_serial *serial)
response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
if (response < 0) {
dev_err(*dev, "%s - error getting bytes available request\n", __FUNCTION__);
dev_err(dev, "%s - error getting bytes available request\n", __FUNCTION__);
}
kfree (transfer_buffer);
......@@ -722,11 +722,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
0, 0, &data, 1, HZ * 3);
if (result < 0) {
dev_err(*dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
dev_err(dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
return result;
}
if (result != 1) {
dev_err(*dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
dev_err(dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
return -EIO;
}
......@@ -736,11 +736,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
USB_DIR_IN | USB_RECIP_INTERFACE,
0, 0, &data, 1, HZ * 3);
if (result < 0) {
dev_err(*dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
dev_err(dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
return result;
}
if (result != 1) {
dev_err(*dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
dev_err(dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
return -EIO;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment