diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-02-20 16:40:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:39 -0400 |
commit | a40d8540f4b7874ef674428cf757e8f466d271ca (patch) | |
tree | 2d5e9c01defd2a930767298bd75040e10b284d5e /drivers/usb/serial/kobil_sct.c | |
parent | 7b1fc8bc6d6881ff7f8876cbe665b3ad5271bc03 (diff) |
USB: kobil_sct: Get rid of unneeded priv->line_state
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 17b3baead4ad..03cb5dd8cbe3 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -139,7 +139,6 @@ struct kobil_private { | |||
139 | int filled; // index of the last char in buf | 139 | int filled; // index of the last char in buf |
140 | int cur_pos; // index of the next char to send in buf | 140 | int cur_pos; // index of the next char to send in buf |
141 | __u16 device_type; | 141 | __u16 device_type; |
142 | int line_state; | ||
143 | }; | 142 | }; |
144 | 143 | ||
145 | 144 | ||
@@ -161,7 +160,6 @@ static int kobil_startup (struct usb_serial *serial) | |||
161 | priv->filled = 0; | 160 | priv->filled = 0; |
162 | priv->cur_pos = 0; | 161 | priv->cur_pos = 0; |
163 | priv->device_type = le16_to_cpu(serial->dev->descriptor.idProduct); | 162 | priv->device_type = le16_to_cpu(serial->dev->descriptor.idProduct); |
164 | priv->line_state = 0; | ||
165 | 163 | ||
166 | switch (priv->device_type){ | 164 | switch (priv->device_type){ |
167 | case KOBIL_ADAPTER_B_PRODUCT_ID: | 165 | case KOBIL_ADAPTER_B_PRODUCT_ID: |
@@ -226,7 +224,6 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp) | |||
226 | 224 | ||
227 | dbg("%s - port %d", __FUNCTION__, port->number); | 225 | dbg("%s - port %d", __FUNCTION__, port->number); |
228 | priv = usb_get_serial_port_data(port); | 226 | priv = usb_get_serial_port_data(port); |
229 | priv->line_state = 0; | ||
230 | 227 | ||
231 | // someone sets the dev to 0 if the close method has been called | 228 | // someone sets the dev to 0 if the close method has been called |
232 | port->interrupt_in_urb->dev = port->serial->dev; | 229 | port->interrupt_in_urb->dev = port->serial->dev; |
@@ -524,14 +521,11 @@ static int kobil_tiocmget(struct usb_serial_port *port, struct file *file) | |||
524 | dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x", | 521 | dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x", |
525 | __FUNCTION__, port->number, result, transfer_buffer[0]); | 522 | __FUNCTION__, port->number, result, transfer_buffer[0]); |
526 | 523 | ||
527 | if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0) { | 524 | result = 0; |
528 | priv->line_state |= TIOCM_DSR; | 525 | if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0) |
529 | } else { | 526 | result = TIOCM_DSR; |
530 | priv->line_state &= ~TIOCM_DSR; | ||
531 | } | ||
532 | |||
533 | kfree(transfer_buffer); | 527 | kfree(transfer_buffer); |
534 | return priv->line_state; | 528 | return result; |
535 | } | 529 | } |
536 | 530 | ||
537 | static int kobil_tiocmset(struct usb_serial_port *port, struct file *file, | 531 | static int kobil_tiocmset(struct usb_serial_port *port, struct file *file, |
@@ -544,6 +538,7 @@ static int kobil_tiocmset(struct usb_serial_port *port, struct file *file, | |||
544 | unsigned char *transfer_buffer; | 538 | unsigned char *transfer_buffer; |
545 | int transfer_buffer_length = 8; | 539 | int transfer_buffer_length = 8; |
546 | 540 | ||
541 | /* FIXME: locking ? */ | ||
547 | priv = usb_get_serial_port_data(port); | 542 | priv = usb_get_serial_port_data(port); |
548 | if ((priv->device_type == KOBIL_USBTWIN_PRODUCT_ID) || (priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)) { | 543 | if ((priv->device_type == KOBIL_USBTWIN_PRODUCT_ID) || (priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)) { |
549 | // This device doesn't support ioctl calls | 544 | // This device doesn't support ioctl calls |