diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-07-14 12:34:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-17 11:23:16 -0400 |
commit | 7b948f1377322b0b95feee62e307b6889a09e4ea (patch) | |
tree | 68d941aa00ea5a07cb7b582943aa88bcd6807f69 /drivers | |
parent | caa97be1a2052f2dfc026c3fe5ef62f620782f24 (diff) |
auxdisplay: constify charlcd_ops.
charlcd_ops are not supposed to change at runtime. All functions
working with charlcd_ops provided by <misc/charlcd.h> work with
const charlcd_ops. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
12750 560 362 13672 3568 drivers/auxdisplay/panel.o
File size After adding 'const':
text data bss dec hex filename
12942 368 362 13672 3568 drivers/auxdisplay/panel.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/auxdisplay/panel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index 7a8b8fb2f572..df126dcdaf18 100644 --- a/drivers/auxdisplay/panel.c +++ b/drivers/auxdisplay/panel.c | |||
@@ -877,21 +877,21 @@ static void lcd_clear_fast_tilcd(struct charlcd *charlcd) | |||
877 | spin_unlock_irq(&pprt_lock); | 877 | spin_unlock_irq(&pprt_lock); |
878 | } | 878 | } |
879 | 879 | ||
880 | static struct charlcd_ops charlcd_serial_ops = { | 880 | static const struct charlcd_ops charlcd_serial_ops = { |
881 | .write_cmd = lcd_write_cmd_s, | 881 | .write_cmd = lcd_write_cmd_s, |
882 | .write_data = lcd_write_data_s, | 882 | .write_data = lcd_write_data_s, |
883 | .clear_fast = lcd_clear_fast_s, | 883 | .clear_fast = lcd_clear_fast_s, |
884 | .backlight = lcd_backlight, | 884 | .backlight = lcd_backlight, |
885 | }; | 885 | }; |
886 | 886 | ||
887 | static struct charlcd_ops charlcd_parallel_ops = { | 887 | static const struct charlcd_ops charlcd_parallel_ops = { |
888 | .write_cmd = lcd_write_cmd_p8, | 888 | .write_cmd = lcd_write_cmd_p8, |
889 | .write_data = lcd_write_data_p8, | 889 | .write_data = lcd_write_data_p8, |
890 | .clear_fast = lcd_clear_fast_p8, | 890 | .clear_fast = lcd_clear_fast_p8, |
891 | .backlight = lcd_backlight, | 891 | .backlight = lcd_backlight, |
892 | }; | 892 | }; |
893 | 893 | ||
894 | static struct charlcd_ops charlcd_tilcd_ops = { | 894 | static const struct charlcd_ops charlcd_tilcd_ops = { |
895 | .write_cmd = lcd_write_cmd_tilcd, | 895 | .write_cmd = lcd_write_cmd_tilcd, |
896 | .write_data = lcd_write_data_tilcd, | 896 | .write_data = lcd_write_data_tilcd, |
897 | .clear_fast = lcd_clear_fast_tilcd, | 897 | .clear_fast = lcd_clear_fast_tilcd, |