ChangeSet 1.879.9.17, 2003/01/07 14:52:33-08:00, greg@kroah.com [PATCH] USB: drivers/usb/serial/ fixups due to dev_printk change diff -Nru a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c --- a/drivers/usb/serial/bus.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/bus.c Wed Jan 8 11:58:25 2003 @@ -66,7 +66,7 @@ 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 @@ 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 @@ 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 @@ 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; diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c --- a/drivers/usb/serial/empeg.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/empeg.c Wed Jan 8 11:58:25 2003 @@ -181,7 +181,7 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ 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; } diff -Nru a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c --- a/drivers/usb/serial/ezusb.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/ezusb.c Wed Jan 8 11:58:25 2003 @@ -41,7 +41,7 @@ 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 @@ 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; } diff -Nru a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c --- a/drivers/usb/serial/generic.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/generic.c Wed Jan 8 11:58:25 2003 @@ -106,7 +106,7 @@ 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 @@ /* 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 @@ 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) diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/io_edgeport.c Wed Jan 8 11:58:25 2003 @@ -572,7 +572,7 @@ 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 @@ 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 @@ 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 @@ * 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ (__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 @@ (__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 @@ 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 @@ /* 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 @@ 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 @@ 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; diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/io_ti.c Wed Jan 8 11:58:25 2003 @@ -473,7 +473,7 @@ oedb = kmalloc (sizeof (* oedb), GFP_KERNEL); if (!oedb) { - dev_err (port->port->dev, "%s - out of memory\n", __FUNCTION__); + dev_err (&port->port->dev, "%s - out of memory\n", __FUNCTION__); return -ENOMEM; } @@ -592,7 +592,7 @@ dbg ("%s - MAX Power = %d", __FUNCTION__, dev->config->desc.bMaxPower*2); if (dev->config->desc.bNumInterfaces != 1) { - dev_err (dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__); + dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__); return -ENODEV; } @@ -692,12 +692,12 @@ rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); if (!rom_desc) { - dev_err (*dev, "%s - out of memory\n", __FUNCTION__); + dev_err (dev, "%s - out of memory\n", __FUNCTION__); return -ENOMEM; } buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL); if (!buffer) { - dev_err (*dev, "%s - out of memory when allocating buffer\n", __FUNCTION__); + dev_err (dev, "%s - out of memory when allocating buffer\n", __FUNCTION__); kfree (rom_desc); return -ENOMEM; } @@ -708,7 +708,7 @@ goto ExitTiValidateI2cImage; if (*buffer != 0x52) { - dev_err (*dev, "%s - invalid buffer signature\n", __FUNCTION__); + dev_err (dev, "%s - invalid buffer signature\n", __FUNCTION__); status = -ENODEV; goto ExitTiValidateI2cImage; } @@ -766,7 +766,7 @@ rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); if (!rom_desc) { - dev_err (serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__); + dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__); return -ENOMEM; } start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc); @@ -823,7 +823,7 @@ buffer = kmalloc (buffer_size, GFP_KERNEL); if (!buffer) { - dev_err (*dev, "%s - out of memory\n", __FUNCTION__); + dev_err (dev, "%s - out of memory\n", __FUNCTION__); return -ENOMEM; } @@ -984,7 +984,7 @@ interface = &serial->serial->dev->config->interface->altsetting->desc; if (!interface) { - dev_err (serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__); + dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__); return -ENODEV; } @@ -1021,7 +1021,7 @@ */ ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); if (!ti_manuf_desc) { - dev_err (*dev, "%s - out of memory.\n", __FUNCTION__); + dev_err (dev, "%s - out of memory.\n", __FUNCTION__); return -ENOMEM; } status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); @@ -1040,7 +1040,7 @@ rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); if (!rom_desc) { - dev_err (*dev, "%s - out of memory.\n", __FUNCTION__); + dev_err (dev, "%s - out of memory.\n", __FUNCTION__); kfree (ti_manuf_desc); return -ENOMEM; } @@ -1054,7 +1054,7 @@ firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL); if (!firmware_version) { - dev_err (*dev, "%s - out of memory.\n", __FUNCTION__); + dev_err (dev, "%s - out of memory.\n", __FUNCTION__); kfree (rom_desc); kfree (ti_manuf_desc); return -ENOMEM; @@ -1131,7 +1131,7 @@ } if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) { - dev_err (*dev, "%s - error resetting device\n", __FUNCTION__); + dev_err (dev, "%s - error resetting device\n", __FUNCTION__); kfree (firmware_version); kfree (rom_desc); kfree (ti_manuf_desc); @@ -1162,7 +1162,7 @@ header = kmalloc (HEADER_SIZE, GFP_KERNEL); if (!header) { - dev_err (*dev, "%s - out of memory.\n", __FUNCTION__); + dev_err (dev, "%s - out of memory.\n", __FUNCTION__); kfree (rom_desc); kfree (ti_manuf_desc); return -ENOMEM; @@ -1170,7 +1170,7 @@ vheader = kmalloc (HEADER_SIZE, GFP_KERNEL); if (!vheader) { - dev_err (*dev, "%s - out of memory.\n", __FUNCTION__); + dev_err (dev, "%s - out of memory.\n", __FUNCTION__); kfree (header); kfree (rom_desc); kfree (ti_manuf_desc); @@ -1302,7 +1302,7 @@ */ ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); if (!ti_manuf_desc) { - dev_err (*dev, "%s - out of memory.\n", __FUNCTION__); + dev_err (dev, "%s - out of memory.\n", __FUNCTION__); return -ENOMEM; } status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); @@ -1337,7 +1337,7 @@ buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header)); buffer = kmalloc (buffer_size, GFP_KERNEL); if (!buffer) { - dev_err (*dev, "%s - out of memory\n", __FUNCTION__); + dev_err (dev, "%s - out of memory\n", __FUNCTION__); return -ENOMEM; } @@ -1702,7 +1702,7 @@ break; default: - dev_err (urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n", + dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n", __FUNCTION__, data[1]); break; @@ -1711,7 +1711,7 @@ 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); } @@ -1779,7 +1779,7 @@ /* continue always trying to read */ 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); } @@ -1855,7 +1855,7 @@ edge_port->dma_address = UMPD_OEDB2_ADDRESS; break; default: - dev_err (port->dev, "Unknown port number!!!\n"); + dev_err (&port->dev, "Unknown port number!!!\n"); return -ENODEV; } @@ -1931,7 +1931,7 @@ /* we are the first port to be opened, let's post the interrupt urb */ urb = edge_serial->serial->port[0].interrupt_in_urb; if (!urb) { - dev_err (port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__); + dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__); return -EINVAL; } urb->complete = edge_interrupt_callback; @@ -1939,7 +1939,7 @@ urb->dev = dev; status = usb_submit_urb (urb, GFP_KERNEL); if (status) { - dev_err (port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status); + dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status); return status; } } @@ -1954,7 +1954,7 @@ /* start up our bulk read urb */ urb = port->read_urb; if (!urb) { - dev_err (port->dev, "%s - no read urb present, exiting\n", __FUNCTION__); + dev_err (&port->dev, "%s - no read urb present, exiting\n", __FUNCTION__); return -EINVAL; } urb->complete = edge_bulk_in_callback; @@ -1962,7 +1962,7 @@ urb->dev = dev; status = usb_submit_urb (urb, GFP_KERNEL); if (status) { - dev_err (port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status); + dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status); return status; } @@ -2072,7 +2072,7 @@ /* 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; @@ -2191,7 +2191,7 @@ port->read_urb->dev = port->serial->dev; status = usb_submit_urb (port->read_urb, GFP_ATOMIC); if (status) { - dev_err (port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status); + dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status); } } @@ -2217,7 +2217,7 @@ config = kmalloc (sizeof (*config), GFP_KERNEL); if (!config) { - dev_err (edge_port->port->dev, "%s - out of memory\n", __FUNCTION__); + dev_err (&edge_port->port->dev, "%s - out of memory\n", __FUNCTION__); return; } @@ -2590,7 +2590,7 @@ /* 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\n", __FUNCTION__); + dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); return -ENOMEM; } memset (edge_serial, 0, sizeof(struct edgeport_serial)); @@ -2607,7 +2607,7 @@ 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\n", __FUNCTION__); + dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); return -ENOMEM; } memset (edge_port, 0, sizeof(struct edgeport_port)); diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c --- a/drivers/usb/serial/ir-usb.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/ir-usb.c Wed Jan 8 11:58:25 2003 @@ -243,7 +243,7 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; } diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c --- a/drivers/usb/serial/keyspan.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/keyspan.c Wed Jan 8 11:58:25 2003 @@ -1035,7 +1035,7 @@ } 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 @@ (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 @@ 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; } diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/pl2303.c Wed Jan 8 11:58:25 2003 @@ -204,7 +204,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; } diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/usb-serial.c Wed Jan 8 11:58:25 2003 @@ -841,7 +841,7 @@ 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 @@ 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 @@ * 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 @@ #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 @@ /* 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ /* free up any memory that we allocated */ kfree (serial); } - dev_info(*dev, "device disconnected\n"); + dev_info(dev, "device disconnected\n"); } diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Wed Jan 8 11:58:25 2003 +++ b/drivers/usb/serial/visor.c Wed Jan 8 11:58:25 2003 @@ -303,7 +303,7 @@ 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 @@ 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 @@ 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 @@ * 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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; }