Skip to contentSkip to conversation

staging: panel: Remove unused variable

PATCH In review Mariusz Gorski 2 participants 2 messages Dec 3, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: panel: Remove unused variable

Remove lcd.left_shift because it is only written to at some places but never read from.

---
 drivers/staging/panel/panel.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/panel/panel.c +0 -6
index 98325b7..b68a9c3 100644
@@ -228,9 +228,6 @@ static struct {
 	bool initialized;
 	bool must_clear;
 
-	/* TODO: use bool here? */
-	char left_shift;
-
 	int height;
 	int width;
 	int bwidth;
@@ -1135,12 +1132,10 @@ static inline int handle_lcd_special_code(void)
 		processed = 1;
 		break;
 	case 'L':	/* shift display left */
-		lcd.left_shift++;
 		lcd_write_cmd(0x18);
 		processed = 1;
 		break;
 	case 'R':	/* shift display right */
-		lcd.left_shift--;
 		lcd_write_cmd(0x1C);
 		processed = 1;
 		break;
@@ -1157,7 +1152,6 @@ static inline int handle_lcd_special_code(void)
 	}
 	case 'I':	/* reinitialize display */
 		lcd_init_display();
-		lcd.left_shift = 0;
 		processed = 1;
 		break;
 	case 'G': {
Signature · 1 line
2.1.3
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Mariusz Gorski

Remove lcd.left_shift because it is only written to at some places but never read from.

Good catch, I think some code got dropped at some point because it was used to shift the window of displayed text. Anyway nobody seems to be missing it :-)

Willy