From abd2557cee2ffddc23c7af39b083e4880b1ea9d9 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 20 Feb 2006 18:51:18 +0200 Subject: [PATCH] ARM: OMAP: lcd_lph8923: fix register read / write MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A local variable hiding the one with the same name at an upper scope, resulted in storing the register address instead of the desired value in LCD registers. In register writes there is no extra cycle after the command, so we use only 9-bit word size. Fix from Peter Ujfalusi . Signed-off-by: Imre Deak Signed-off-by: Juha Yrjölä --- drivers/video/omap/lcd_lph8923.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/video/omap/lcd_lph8923.c b/drivers/video/omap/lcd_lph8923.c index 64e1c54b9b3..69f5f184335 100644 --- a/drivers/video/omap/lcd_lph8923.c +++ b/drivers/video/omap/lcd_lph8923.c @@ -163,13 +163,7 @@ static void lph8923_write(int cmd, const u8 *buf, int len) spi_message_init(&m); m.spi = lph8923.spi; - - if (len > 1) { - cmd <<= 1; - set_spi_data_width(10); - } else { - set_spi_data_width(9); - } + set_spi_data_width(9); t.cs_change = 0; w = cmd; @@ -183,12 +177,8 @@ static void lph8923_write(int cmd, const u8 *buf, int len) if (!len) return; - set_spi_data_width(9); - t.tx_buf = &w; for (i = 0; i < len; i++) { - u16 w; - spi_message_init(&m); m.spi = lph8923.spi; spi_message_add_tail(&t, &m); -- 2.41.1