misc: panel: Fix LCD_FLAG_F/LCD_FLAG_N exchange
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 6 Feb 2017 14:38:03 +0000 (15:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Feb 2017 14:32:53 +0000 (15:32 +0100)
LCD_FLAG_F is the font flag, LCD_FLAG_N is the two-lines flag.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/panel.c

index 6030ac5b8c63919018da1ad3b2e8957ae881636d..cac7ac62ce5b71d7414f238f9b4f7c184ae7e2d0 100644 (file)
@@ -1278,9 +1278,10 @@ static inline int handle_lcd_special_code(void)
                        lcd_write_cmd(LCD_CMD_FUNCTION_SET
                                      | LCD_CMD_DATA_LEN_8BITS
                                      | ((lcd.flags & LCD_FLAG_F)
-                                                     ? LCD_CMD_TWO_LINES : 0)
-                                     | ((lcd.flags & LCD_FLAG_N)
                                                      ? LCD_CMD_FONT_5X10_DOTS
+                                                                     : 0)
+                                     | ((lcd.flags & LCD_FLAG_N)
+                                                     ? LCD_CMD_TWO_LINES
                                                                      : 0));
                /* check whether L flag was changed */
                else if ((oldflags ^ lcd.flags) & (LCD_FLAG_L)) {