Skip to contentSkip to conversation

backlight: lms283gf05: add missing const

PATCH In review Jingoo Han 2 participants 3 messages Oct 23, 2012

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 2/4 backlight: lms283gf05: add missing const

Add 'const' to static array that was missing it in its definition.

Cc Marek Vasut <[email protected]>
Cc Richard Purdie <[email protected]>
---
 drivers/video/backlight/lms283gf05.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/video/backlight/lms283gf05.c +3 -3
index ea43f22..151f0da 100644
@@ -31,7 +31,7 @@ struct lms283gf05_seq {
 };
 
 /* Magic sequences supplied by manufacturer, for details refer to datasheet */
-static struct lms283gf05_seq disp_initseq[] = {
+static const struct lms283gf05_seq disp_initseq[] = {
 	/* REG, VALUE, DELAY */
 	{ 0x07, 0x0000, 0 },
 	{ 0x13, 0x0000, 10 },
@@ -78,7 +78,7 @@ static struct lms283gf05_seq disp_initseq[] = {
 	{ 0x22, 0x0000, 0 }
 };
 
-static struct lms283gf05_seq disp_pdwnseq[] = {
+static const struct lms283gf05_seq disp_pdwnseq[] = {
 	{ 0x07, 0x0016, 30 },
 
 	{ 0x07, 0x0004, 0 },
@@ -104,7 +104,7 @@ static void lms283gf05_reset(unsigned long gpio, bool inverted)
 }
 
 static void lms283gf05_toggle(struct spi_device *spi,
-			struct lms283gf05_seq *seq, int sz)
+				const struct lms283gf05_seq *seq, int sz)
 {
 	char buf[3];
 	int i;
Signature · 1 line
1.7.1
author
#2 lore raw

On Tuesday, October 23, 2012 4:35 PM Marek Vasut wrote

Quoted 7 lines

Dear Jingoo Han,

Quoted 2 lines

Add 'const' to static array that was missing it in its definition.

Did you get compiler warning? Still, this is a good pick

No, I didn't get compiler warning. :)
Thank you for your reply.

Quoted 11 lines
Quoted 4 lines
Cc Marek Vasut <[email protected]>
Cc Richard Purdie <[email protected]>

---

[...]

Best regards,
Marek Vasut