aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-12-17 19:00:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 20:15:16 -0500
commit53c7a2fffd71787299d6c7a7107b233d37ad7284 (patch)
tree0ca70e98a2e5e156da1158b828cdc27ae5714947 /drivers/video
parentc22e61b339146ed80eb0125f18d698883f99825a (diff)
drivers/video/backlight/tdo24m.c: add missing const
Add 'const' to static array that was missing it in its definition. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/tdo24m.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c
index 76bbde19d34..ad2325f3d65 100644
--- a/drivers/video/backlight/tdo24m.c
+++ b/drivers/video/backlight/tdo24m.c
@@ -47,7 +47,7 @@ struct tdo24m {
47 ((x1) << 9) | 0x100 | (x2)) 47 ((x1) << 9) | 0x100 | (x2))
48#define CMD_NULL (-1) 48#define CMD_NULL (-1)
49 49
50static uint32_t lcd_panel_reset[] = { 50static const uint32_t lcd_panel_reset[] = {
51 CMD0(0x1), /* reset */ 51 CMD0(0x1), /* reset */
52 CMD0(0x0), /* nop */ 52 CMD0(0x0), /* nop */
53 CMD0(0x0), /* nop */ 53 CMD0(0x0), /* nop */
@@ -55,7 +55,7 @@ static uint32_t lcd_panel_reset[] = {
55 CMD_NULL, 55 CMD_NULL,
56}; 56};
57 57
58static uint32_t lcd_panel_on[] = { 58static const uint32_t lcd_panel_on[] = {
59 CMD0(0x29), /* Display ON */ 59 CMD0(0x29), /* Display ON */
60 CMD2(0xB8, 0xFF, 0xF9), /* Output Control */ 60 CMD2(0xB8, 0xFF, 0xF9), /* Output Control */
61 CMD0(0x11), /* Sleep out */ 61 CMD0(0x11), /* Sleep out */
@@ -63,7 +63,7 @@ static uint32_t lcd_panel_on[] = {
63 CMD_NULL, 63 CMD_NULL,
64}; 64};
65 65
66static uint32_t lcd_panel_off[] = { 66static const uint32_t lcd_panel_off[] = {
67 CMD0(0x28), /* Display OFF */ 67 CMD0(0x28), /* Display OFF */
68 CMD2(0xB8, 0x80, 0x02), /* Output Control */ 68 CMD2(0xB8, 0x80, 0x02), /* Output Control */
69 CMD0(0x10), /* Sleep in */ 69 CMD0(0x10), /* Sleep in */
@@ -71,7 +71,7 @@ static uint32_t lcd_panel_off[] = {
71 CMD_NULL, 71 CMD_NULL,
72}; 72};
73 73
74static uint32_t lcd_vga_pass_through_tdo24m[] = { 74static const uint32_t lcd_vga_pass_through_tdo24m[] = {
75 CMD1(0xB0, 0x16), 75 CMD1(0xB0, 0x16),
76 CMD1(0xBC, 0x80), 76 CMD1(0xBC, 0x80),
77 CMD1(0xE1, 0x00), 77 CMD1(0xE1, 0x00),
@@ -80,7 +80,7 @@ static uint32_t lcd_vga_pass_through_tdo24m[] = {
80 CMD_NULL, 80 CMD_NULL,
81}; 81};
82 82
83static uint32_t lcd_qvga_pass_through_tdo24m[] = { 83static const uint32_t lcd_qvga_pass_through_tdo24m[] = {
84 CMD1(0xB0, 0x16), 84 CMD1(0xB0, 0x16),
85 CMD1(0xBC, 0x81), 85 CMD1(0xBC, 0x81),
86 CMD1(0xE1, 0x00), 86 CMD1(0xE1, 0x00),
@@ -89,7 +89,7 @@ static uint32_t lcd_qvga_pass_through_tdo24m[] = {
89 CMD_NULL, 89 CMD_NULL,
90}; 90};
91 91
92static uint32_t lcd_vga_transfer_tdo24m[] = { 92static const uint32_t lcd_vga_transfer_tdo24m[] = {
93 CMD1(0xcf, 0x02), /* Blanking period control (1) */ 93 CMD1(0xcf, 0x02), /* Blanking period control (1) */
94 CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */ 94 CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */
95 CMD1(0xd1, 0x01), /* CKV timing control on/off */ 95 CMD1(0xd1, 0x01), /* CKV timing control on/off */
@@ -102,7 +102,7 @@ static uint32_t lcd_vga_transfer_tdo24m[] = {
102 CMD_NULL, 102 CMD_NULL,
103}; 103};
104 104
105static uint32_t lcd_qvga_transfer[] = { 105static const uint32_t lcd_qvga_transfer[] = {
106 CMD1(0xd6, 0x02), /* Blanking period control (1) */ 106 CMD1(0xd6, 0x02), /* Blanking period control (1) */
107 CMD2(0xd7, 0x08, 0x04), /* Blanking period control (2) */ 107 CMD2(0xd7, 0x08, 0x04), /* Blanking period control (2) */
108 CMD1(0xd8, 0x01), /* CKV timing control on/off */ 108 CMD1(0xd8, 0x01), /* CKV timing control on/off */
@@ -115,7 +115,7 @@ static uint32_t lcd_qvga_transfer[] = {
115 CMD_NULL, 115 CMD_NULL,
116}; 116};
117 117
118static uint32_t lcd_vga_pass_through_tdo35s[] = { 118static const uint32_t lcd_vga_pass_through_tdo35s[] = {
119 CMD1(0xB0, 0x16), 119 CMD1(0xB0, 0x16),
120 CMD1(0xBC, 0x80), 120 CMD1(0xBC, 0x80),
121 CMD1(0xE1, 0x00), 121 CMD1(0xE1, 0x00),
@@ -123,7 +123,7 @@ static uint32_t lcd_vga_pass_through_tdo35s[] = {
123 CMD_NULL, 123 CMD_NULL,
124}; 124};
125 125
126static uint32_t lcd_qvga_pass_through_tdo35s[] = { 126static const uint32_t lcd_qvga_pass_through_tdo35s[] = {
127 CMD1(0xB0, 0x16), 127 CMD1(0xB0, 0x16),
128 CMD1(0xBC, 0x81), 128 CMD1(0xBC, 0x81),
129 CMD1(0xE1, 0x00), 129 CMD1(0xE1, 0x00),
@@ -131,7 +131,7 @@ static uint32_t lcd_qvga_pass_through_tdo35s[] = {
131 CMD_NULL, 131 CMD_NULL,
132}; 132};
133 133
134static uint32_t lcd_vga_transfer_tdo35s[] = { 134static const uint32_t lcd_vga_transfer_tdo35s[] = {
135 CMD1(0xcf, 0x02), /* Blanking period control (1) */ 135 CMD1(0xcf, 0x02), /* Blanking period control (1) */
136 CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */ 136 CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */
137 CMD1(0xd1, 0x01), /* CKV timing control on/off */ 137 CMD1(0xd1, 0x01), /* CKV timing control on/off */
@@ -144,7 +144,7 @@ static uint32_t lcd_vga_transfer_tdo35s[] = {
144 CMD_NULL, 144 CMD_NULL,
145}; 145};
146 146
147static uint32_t lcd_panel_config[] = { 147static const uint32_t lcd_panel_config[] = {
148 CMD2(0xb8, 0xff, 0xf9), /* Output control */ 148 CMD2(0xb8, 0xff, 0xf9), /* Output control */
149 CMD0(0x11), /* sleep out */ 149 CMD0(0x11), /* sleep out */
150 CMD1(0xba, 0x01), /* Display mode (1) */ 150 CMD1(0xba, 0x01), /* Display mode (1) */
@@ -175,10 +175,11 @@ static uint32_t lcd_panel_config[] = {
175 CMD_NULL, 175 CMD_NULL,
176}; 176};
177 177
178static int tdo24m_writes(struct tdo24m *lcd, uint32_t *array) 178static int tdo24m_writes(struct tdo24m *lcd, const uint32_t *array)
179{ 179{
180 struct spi_transfer *x = &lcd->xfer; 180 struct spi_transfer *x = &lcd->xfer;
181 uint32_t data, *p = array; 181 const uint32_t *p = array;
182 uint32_t data;
182 int nparams, err = 0; 183 int nparams, err = 0;
183 184
184 for (; *p != CMD_NULL; p++) { 185 for (; *p != CMD_NULL; p++) {