diff options
author | Lionel Debroux <lionel_debroux@yahoo.fr> | 2010-11-16 08:14:02 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-11-16 08:14:02 -0500 |
commit | acc2472ed33fc5e72482cc3b3b846077d97c2f8b (patch) | |
tree | 081b0693cce25cc85f11b613d096de91bdfb824b /drivers/video | |
parent | 073ef1f6e508688392580e4f35dcad9aabd1e100 (diff) |
backlight: constify backlight_ops
backlight_device_register has been expecting a const "ops" argument, and using
it as such, since 9905a43b2d563e6f89e4c63c4278ada03f2ebb14. Let's make the
remaining backlight_ops instances const.
Inspired by hunks of the grsecurity patch, updated for newer kernels.
Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 2 | ||||
-rw-r--r-- | drivers/video/aty/aty128fb.c | 2 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 2 | ||||
-rw-r--r-- | drivers/video/aty/radeon_backlight.c | 2 | ||||
-rw-r--r-- | drivers/video/backlight/88pm860x_bl.c | 2 | ||||
-rw-r--r-- | drivers/video/backlight/max8925_bl.c | 2 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_backlight.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 2 | ||||
-rw-r--r-- | drivers/video/riva/fbdev.c | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 8dce25126330..bac163450216 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -111,7 +111,7 @@ static int atmel_bl_get_brightness(struct backlight_device *bl) | |||
111 | return lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL); | 111 | return lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL); |
112 | } | 112 | } |
113 | 113 | ||
114 | static struct backlight_ops atmel_lcdc_bl_ops = { | 114 | static const struct backlight_ops atmel_lcdc_bl_ops = { |
115 | .update_status = atmel_bl_update_status, | 115 | .update_status = atmel_bl_update_status, |
116 | .get_brightness = atmel_bl_get_brightness, | 116 | .get_brightness = atmel_bl_get_brightness, |
117 | }; | 117 | }; |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 34a0851bcbfa..dd9de2e80580 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -1786,7 +1786,7 @@ static int aty128_bl_get_brightness(struct backlight_device *bd) | |||
1786 | return bd->props.brightness; | 1786 | return bd->props.brightness; |
1787 | } | 1787 | } |
1788 | 1788 | ||
1789 | static struct backlight_ops aty128_bl_data = { | 1789 | static const struct backlight_ops aty128_bl_data = { |
1790 | .get_brightness = aty128_bl_get_brightness, | 1790 | .get_brightness = aty128_bl_get_brightness, |
1791 | .update_status = aty128_bl_update_status, | 1791 | .update_status = aty128_bl_update_status, |
1792 | }; | 1792 | }; |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 5bf91236c701..4d5c41371543 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2221,7 +2221,7 @@ static int aty_bl_get_brightness(struct backlight_device *bd) | |||
2221 | return bd->props.brightness; | 2221 | return bd->props.brightness; |
2222 | } | 2222 | } |
2223 | 2223 | ||
2224 | static struct backlight_ops aty_bl_data = { | 2224 | static const struct backlight_ops aty_bl_data = { |
2225 | .get_brightness = aty_bl_get_brightness, | 2225 | .get_brightness = aty_bl_get_brightness, |
2226 | .update_status = aty_bl_update_status, | 2226 | .update_status = aty_bl_update_status, |
2227 | }; | 2227 | }; |
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c index 256966e9667d..9b811ddbce83 100644 --- a/drivers/video/aty/radeon_backlight.c +++ b/drivers/video/aty/radeon_backlight.c | |||
@@ -128,7 +128,7 @@ static int radeon_bl_get_brightness(struct backlight_device *bd) | |||
128 | return bd->props.brightness; | 128 | return bd->props.brightness; |
129 | } | 129 | } |
130 | 130 | ||
131 | static struct backlight_ops radeon_bl_data = { | 131 | static const struct backlight_ops radeon_bl_data = { |
132 | .get_brightness = radeon_bl_get_brightness, | 132 | .get_brightness = radeon_bl_get_brightness, |
133 | .update_status = radeon_bl_update_status, | 133 | .update_status = radeon_bl_update_status, |
134 | }; | 134 | }; |
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index 38ffc3fbcbe4..c789c46e38af 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c | |||
@@ -155,7 +155,7 @@ out: | |||
155 | return -EINVAL; | 155 | return -EINVAL; |
156 | } | 156 | } |
157 | 157 | ||
158 | static struct backlight_ops pm860x_backlight_ops = { | 158 | static const struct backlight_ops pm860x_backlight_ops = { |
159 | .options = BL_CORE_SUSPENDRESUME, | 159 | .options = BL_CORE_SUSPENDRESUME, |
160 | .update_status = pm860x_backlight_update_status, | 160 | .update_status = pm860x_backlight_update_status, |
161 | .get_brightness = pm860x_backlight_get_brightness, | 161 | .get_brightness = pm860x_backlight_get_brightness, |
diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index b2b2c7ba1f63..209acc105cbc 100644 --- a/drivers/video/backlight/max8925_bl.c +++ b/drivers/video/backlight/max8925_bl.c | |||
@@ -92,7 +92,7 @@ static int max8925_backlight_get_brightness(struct backlight_device *bl) | |||
92 | return ret; | 92 | return ret; |
93 | } | 93 | } |
94 | 94 | ||
95 | static struct backlight_ops max8925_backlight_ops = { | 95 | static const struct backlight_ops max8925_backlight_ops = { |
96 | .options = BL_CORE_SUSPENDRESUME, | 96 | .options = BL_CORE_SUSPENDRESUME, |
97 | .update_status = max8925_backlight_update_status, | 97 | .update_status = max8925_backlight_update_status, |
98 | .get_brightness = max8925_backlight_get_brightness, | 98 | .get_brightness = max8925_backlight_get_brightness, |
diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c index 2fb552a6f32c..6aac6d1b937b 100644 --- a/drivers/video/nvidia/nv_backlight.c +++ b/drivers/video/nvidia/nv_backlight.c | |||
@@ -87,7 +87,7 @@ static int nvidia_bl_get_brightness(struct backlight_device *bd) | |||
87 | return bd->props.brightness; | 87 | return bd->props.brightness; |
88 | } | 88 | } |
89 | 89 | ||
90 | static struct backlight_ops nvidia_bl_ops = { | 90 | static const struct backlight_ops nvidia_bl_ops = { |
91 | .get_brightness = nvidia_bl_get_brightness, | 91 | .get_brightness = nvidia_bl_get_brightness, |
92 | .update_status = nvidia_bl_update_status, | 92 | .update_status = nvidia_bl_update_status, |
93 | }; | 93 | }; |
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index e1c765d11419..61026f96ad20 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -465,7 +465,7 @@ static int taal_bl_get_intensity(struct backlight_device *dev) | |||
465 | return 0; | 465 | return 0; |
466 | } | 466 | } |
467 | 467 | ||
468 | static struct backlight_ops taal_bl_ops = { | 468 | static const struct backlight_ops taal_bl_ops = { |
469 | .get_brightness = taal_bl_get_intensity, | 469 | .get_brightness = taal_bl_get_intensity, |
470 | .update_status = taal_bl_update_status, | 470 | .update_status = taal_bl_update_status, |
471 | }; | 471 | }; |
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 618f36bec10d..da388186d617 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -331,7 +331,7 @@ static int riva_bl_get_brightness(struct backlight_device *bd) | |||
331 | return bd->props.brightness; | 331 | return bd->props.brightness; |
332 | } | 332 | } |
333 | 333 | ||
334 | static struct backlight_ops riva_bl_ops = { | 334 | static const struct backlight_ops riva_bl_ops = { |
335 | .get_brightness = riva_bl_get_brightness, | 335 | .get_brightness = riva_bl_get_brightness, |
336 | .update_status = riva_bl_update_status, | 336 | .update_status = riva_bl_update_status, |
337 | }; | 337 | }; |