diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch new file mode 100644 index 00000000..b4b68f14 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 58521f4f0eea9b60818ecf8368fb0da47373e076 Mon Sep 17 00:00:00 2001 | ||
2 | From: Johan Hovold <jhovold@gmail.com> | ||
3 | Date: Mon, 16 Jan 2012 00:36:48 +0100 | ||
4 | Subject: [PATCH 82/90] USB: cp210x: call generic open last in open | ||
5 | |||
6 | commit 55b2afbb92ad92e9f6b0aa4354eb1c94589280c3 upstream. | ||
7 | |||
8 | Make sure port is fully initialised before calling generic open. | ||
9 | |||
10 | Signed-off-by: Johan Hovold <jhovold@gmail.com> | ||
11 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
12 | --- | ||
13 | drivers/usb/serial/cp210x.c | 9 ++------- | ||
14 | 1 files changed, 2 insertions(+), 7 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c | ||
17 | index 3b43d9b..cbcaddb 100644 | ||
18 | --- a/drivers/usb/serial/cp210x.c | ||
19 | +++ b/drivers/usb/serial/cp210x.c | ||
20 | @@ -393,8 +393,6 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) { | ||
21 | |||
22 | static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port) | ||
23 | { | ||
24 | - int result; | ||
25 | - | ||
26 | dbg("%s - port %d", __func__, port->number); | ||
27 | |||
28 | if (cp210x_set_config_single(port, CP210X_IFC_ENABLE, UART_ENABLE)) { | ||
29 | @@ -403,13 +401,10 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port) | ||
30 | return -EPROTO; | ||
31 | } | ||
32 | |||
33 | - result = usb_serial_generic_open(tty, port); | ||
34 | - if (result) | ||
35 | - return result; | ||
36 | - | ||
37 | /* Configure the termios structure */ | ||
38 | cp210x_get_termios(tty, port); | ||
39 | - return 0; | ||
40 | + | ||
41 | + return usb_serial_generic_open(tty, port); | ||
42 | } | ||
43 | |||
44 | static void cp210x_close(struct usb_serial_port *port) | ||
45 | -- | ||
46 | 1.7.7.4 | ||
47 | |||