[PATCH 3.2 117/185] USB: spcp8x5: correct handling of CS5 setting

2013-12-28 Thread Ben Hutchings
3.2.54-rc1 review patch.  If anyone has any objections, please let me know.

--

From: Colin Leitner 

commit 711fbdfbf2bc4827214a650afe3f64767a1aba16 upstream.

This patch removes an erroneous check of CSIZE, which made it impossible to set
CS5.

Compiles clean, but couldn't test against hardware.

Signed-off-by: Colin Leitner 
Signed-off-by: Johan Hovold 
Signed-off-by: Greg Kroah-Hartman 
Signed-off-by: Ben Hutchings 
---
 drivers/usb/serial/spcp8x5.c | 30 ++
 1 file changed, 14 insertions(+), 16 deletions(-)

--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -394,22 +394,20 @@ static void spcp8x5_set_termios(struct t
}
 
/* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */
-   if (cflag & CSIZE) {
-   switch (cflag & CSIZE) {
-   case CS5:
-   buf[1] |= SET_UART_FORMAT_SIZE_5;
-   break;
-   case CS6:
-   buf[1] |= SET_UART_FORMAT_SIZE_6;
-   break;
-   case CS7:
-   buf[1] |= SET_UART_FORMAT_SIZE_7;
-   break;
-   default:
-   case CS8:
-   buf[1] |= SET_UART_FORMAT_SIZE_8;
-   break;
-   }
+   switch (cflag & CSIZE) {
+   case CS5:
+   buf[1] |= SET_UART_FORMAT_SIZE_5;
+   break;
+   case CS6:
+   buf[1] |= SET_UART_FORMAT_SIZE_6;
+   break;
+   case CS7:
+   buf[1] |= SET_UART_FORMAT_SIZE_7;
+   break;
+   default:
+   case CS8:
+   buf[1] |= SET_UART_FORMAT_SIZE_8;
+   break;
}
 
/* Set Stop bit2 : 0:1bit 1:2bit */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3.2 117/185] USB: spcp8x5: correct handling of CS5 setting

2013-12-28 Thread Ben Hutchings
3.2.54-rc1 review patch.  If anyone has any objections, please let me know.

--

From: Colin Leitner colin.leit...@googlemail.com

commit 711fbdfbf2bc4827214a650afe3f64767a1aba16 upstream.

This patch removes an erroneous check of CSIZE, which made it impossible to set
CS5.

Compiles clean, but couldn't test against hardware.

Signed-off-by: Colin Leitner colin.leit...@gmail.com
Signed-off-by: Johan Hovold jhov...@gmail.com
Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/usb/serial/spcp8x5.c | 30 ++
 1 file changed, 14 insertions(+), 16 deletions(-)

--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -394,22 +394,20 @@ static void spcp8x5_set_termios(struct t
}
 
/* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */
-   if (cflag  CSIZE) {
-   switch (cflag  CSIZE) {
-   case CS5:
-   buf[1] |= SET_UART_FORMAT_SIZE_5;
-   break;
-   case CS6:
-   buf[1] |= SET_UART_FORMAT_SIZE_6;
-   break;
-   case CS7:
-   buf[1] |= SET_UART_FORMAT_SIZE_7;
-   break;
-   default:
-   case CS8:
-   buf[1] |= SET_UART_FORMAT_SIZE_8;
-   break;
-   }
+   switch (cflag  CSIZE) {
+   case CS5:
+   buf[1] |= SET_UART_FORMAT_SIZE_5;
+   break;
+   case CS6:
+   buf[1] |= SET_UART_FORMAT_SIZE_6;
+   break;
+   case CS7:
+   buf[1] |= SET_UART_FORMAT_SIZE_7;
+   break;
+   default:
+   case CS8:
+   buf[1] |= SET_UART_FORMAT_SIZE_8;
+   break;
}
 
/* Set Stop bit2 : 0:1bit 1:2bit */

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/