backlight: constify backlight_ops
backlight_device_register has been expecting a const "ops" argument, and using
it as such, since 9905a43b2d
. 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>
This commit is contained in:

committed by
Jiri Kosina

parent
073ef1f6e5
commit
acc2472ed3
@@ -58,7 +58,7 @@ static int nv40_set_intensity(struct backlight_device *bd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct backlight_ops nv40_bl_ops = {
|
||||
static const struct backlight_ops nv40_bl_ops = {
|
||||
.options = BL_CORE_SUSPENDRESUME,
|
||||
.get_brightness = nv40_get_intensity,
|
||||
.update_status = nv40_set_intensity,
|
||||
@@ -81,7 +81,7 @@ static int nv50_set_intensity(struct backlight_device *bd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct backlight_ops nv50_bl_ops = {
|
||||
static const struct backlight_ops nv50_bl_ops = {
|
||||
.options = BL_CORE_SUSPENDRESUME,
|
||||
.get_brightness = nv50_get_intensity,
|
||||
.update_status = nv50_set_intensity,
|
||||
|
Reference in New Issue
Block a user