mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
auxdisplay: panel: Remove redundant charlcd_ops structures
The three struct charlcd_ops contain the same data, so we only need one of this structures. The other two are removed. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
committed by
Miguel Ojeda
parent
32d917e754
commit
351dcacc6d
@@ -808,41 +808,7 @@ static void lcd_write_data_tilcd(struct hd44780_common *hdc, int data)
|
|||||||
spin_unlock_irq(&pprt_lock);
|
spin_unlock_irq(&pprt_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct charlcd_ops charlcd_serial_ops = {
|
static const struct charlcd_ops charlcd_ops = {
|
||||||
.backlight = lcd_backlight,
|
|
||||||
.print = hd44780_common_print,
|
|
||||||
.gotoxy = hd44780_common_gotoxy,
|
|
||||||
.home = hd44780_common_home,
|
|
||||||
.clear_display = hd44780_common_clear_display,
|
|
||||||
.init_display = hd44780_common_init_display,
|
|
||||||
.shift_cursor = hd44780_common_shift_cursor,
|
|
||||||
.shift_display = hd44780_common_shift_display,
|
|
||||||
.display = hd44780_common_display,
|
|
||||||
.cursor = hd44780_common_cursor,
|
|
||||||
.blink = hd44780_common_blink,
|
|
||||||
.fontsize = hd44780_common_fontsize,
|
|
||||||
.lines = hd44780_common_lines,
|
|
||||||
.redefine_char = hd44780_common_redefine_char,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct charlcd_ops charlcd_parallel_ops = {
|
|
||||||
.backlight = lcd_backlight,
|
|
||||||
.print = hd44780_common_print,
|
|
||||||
.gotoxy = hd44780_common_gotoxy,
|
|
||||||
.home = hd44780_common_home,
|
|
||||||
.clear_display = hd44780_common_clear_display,
|
|
||||||
.init_display = hd44780_common_init_display,
|
|
||||||
.shift_cursor = hd44780_common_shift_cursor,
|
|
||||||
.shift_display = hd44780_common_shift_display,
|
|
||||||
.display = hd44780_common_display,
|
|
||||||
.cursor = hd44780_common_cursor,
|
|
||||||
.blink = hd44780_common_blink,
|
|
||||||
.fontsize = hd44780_common_fontsize,
|
|
||||||
.lines = hd44780_common_lines,
|
|
||||||
.redefine_char = hd44780_common_redefine_char,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct charlcd_ops charlcd_tilcd_ops = {
|
|
||||||
.backlight = lcd_backlight,
|
.backlight = lcd_backlight,
|
||||||
.print = hd44780_common_print,
|
.print = hd44780_common_print,
|
||||||
.gotoxy = hd44780_common_gotoxy,
|
.gotoxy = hd44780_common_gotoxy,
|
||||||
@@ -984,7 +950,7 @@ static void lcd_init(void)
|
|||||||
charlcd->height = DEFAULT_LCD_HEIGHT;
|
charlcd->height = DEFAULT_LCD_HEIGHT;
|
||||||
|
|
||||||
if (lcd.proto == LCD_PROTO_SERIAL) { /* SERIAL */
|
if (lcd.proto == LCD_PROTO_SERIAL) { /* SERIAL */
|
||||||
charlcd->ops = &charlcd_serial_ops;
|
charlcd->ops = &charlcd_ops;
|
||||||
hdc->write_data = lcd_write_data_s;
|
hdc->write_data = lcd_write_data_s;
|
||||||
hdc->write_cmd = lcd_write_cmd_s;
|
hdc->write_cmd = lcd_write_cmd_s;
|
||||||
|
|
||||||
@@ -994,7 +960,7 @@ static void lcd_init(void)
|
|||||||
lcd.pins.da = DEFAULT_LCD_PIN_SDA;
|
lcd.pins.da = DEFAULT_LCD_PIN_SDA;
|
||||||
|
|
||||||
} else if (lcd.proto == LCD_PROTO_PARALLEL) { /* PARALLEL */
|
} else if (lcd.proto == LCD_PROTO_PARALLEL) { /* PARALLEL */
|
||||||
charlcd->ops = &charlcd_parallel_ops;
|
charlcd->ops = &charlcd_ops;
|
||||||
hdc->write_data = lcd_write_data_p8;
|
hdc->write_data = lcd_write_data_p8;
|
||||||
hdc->write_cmd = lcd_write_cmd_p8;
|
hdc->write_cmd = lcd_write_cmd_p8;
|
||||||
|
|
||||||
@@ -1005,7 +971,7 @@ static void lcd_init(void)
|
|||||||
if (lcd.pins.rw == PIN_NOT_SET)
|
if (lcd.pins.rw == PIN_NOT_SET)
|
||||||
lcd.pins.rw = DEFAULT_LCD_PIN_RW;
|
lcd.pins.rw = DEFAULT_LCD_PIN_RW;
|
||||||
} else {
|
} else {
|
||||||
charlcd->ops = &charlcd_tilcd_ops;
|
charlcd->ops = &charlcd_ops;
|
||||||
hdc->write_data = lcd_write_data_tilcd;
|
hdc->write_data = lcd_write_data_tilcd;
|
||||||
hdc->write_cmd = lcd_write_cmd_tilcd;
|
hdc->write_cmd = lcd_write_cmd_tilcd;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user