aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/iuu_phoenix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/iuu_phoenix.c')
-rw-r--r--drivers/usb/serial/iuu_phoenix.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 43f13cf2f016..74551cb2e8ee 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -1044,34 +1044,6 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
1044 if (buf == NULL) 1044 if (buf == NULL)
1045 return -ENOMEM; 1045 return -ENOMEM;
1046 1046
1047 /* fixup the endpoint buffer size */
1048 kfree(port->bulk_out_buffer);
1049 port->bulk_out_buffer = kmalloc(512, GFP_KERNEL);
1050 port->bulk_out_size = 512;
1051 kfree(port->bulk_in_buffer);
1052 port->bulk_in_buffer = kmalloc(512, GFP_KERNEL);
1053 port->bulk_in_size = 512;
1054
1055 if (!port->bulk_out_buffer || !port->bulk_in_buffer) {
1056 kfree(port->bulk_out_buffer);
1057 kfree(port->bulk_in_buffer);
1058 kfree(buf);
1059 return -ENOMEM;
1060 }
1061
1062 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
1063 usb_sndbulkpipe(port->serial->dev,
1064 port->bulk_out_endpointAddress),
1065 port->bulk_out_buffer, 512,
1066 NULL, NULL);
1067
1068
1069 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
1070 usb_rcvbulkpipe(port->serial->dev,
1071 port->bulk_in_endpointAddress),
1072 port->bulk_in_buffer, 512,
1073 NULL, NULL);
1074
1075 priv->poll = 0; 1047 priv->poll = 0;
1076 1048
1077 /* initialize writebuf */ 1049 /* initialize writebuf */
@@ -1277,6 +1249,8 @@ static struct usb_serial_driver iuu_device = {
1277 }, 1249 },
1278 .id_table = id_table, 1250 .id_table = id_table,
1279 .num_ports = 1, 1251 .num_ports = 1,
1252 .bulk_in_size = 512,
1253 .bulk_out_size = 512,
1280 .port_probe = iuu_create_sysfs_attrs, 1254 .port_probe = iuu_create_sysfs_attrs,
1281 .port_remove = iuu_remove_sysfs_attrs, 1255 .port_remove = iuu_remove_sysfs_attrs,
1282 .open = iuu_open, 1256 .open = iuu_open,