[PATCH] video: backlight: fix const array syntax

Subsystems: backlight class/subsystem, framebuffer layer, the rest

STALE5509d

2 messages, 1 author, 2011-07-20 · open the first message on its own page

[PATCH] video: backlight: fix const array syntax

From: Greg Dietsche <hidden>
Date: 2011-07-01 22:47:11

Correct the syntax so that both array and pointer are const.

Signed-off-by: Greg Dietsche <redacted>
---
 drivers/video/backlight/backlight.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 80d292f..4bda2e7 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -19,7 +19,7 @@
 #include <asm/backlight.h>
 #endif
 
-static const char const *backlight_types[] = {
+static const char * const backlight_types[] = {
 	[BACKLIGHT_RAW] = "raw",
 	[BACKLIGHT_PLATFORM] = "platform",
 	[BACKLIGHT_FIRMWARE] = "firmware",
-- 
1.7.2.5

Re: [PATCH] video: backlight: fix const array syntax

From: Greg Dietsche <hidden>
Date: 2011-07-20 02:09:06


On 07/01/2011 05:47 PM, Greg Dietsche wrote:
quoted hunk
Correct the syntax so that both array and pointer are const.

Signed-off-by: Greg Dietsche<redacted>
---
  drivers/video/backlight/backlight.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 80d292f..4bda2e7 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -19,7 +19,7 @@
  #include<asm/backlight.h>
  #endif

-static const char const *backlight_types[] = {
+static const char * const backlight_types[] = {
  	[BACKLIGHT_RAW] = "raw",
  	[BACKLIGHT_PLATFORM] = "platform",
  	[BACKLIGHT_FIRMWARE] = "firmware",
   
adding trivial@kernel.org to the cc list since this is trivial and no 
one has picked up this patch to date.

Greg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help