Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acc2472e authored by Lionel Debroux's avatar Lionel Debroux Committed by Jiri Kosina
Browse files

backlight: constify backlight_ops



backlight_device_register has been expecting a const "ops" argument, and using
it as such, since 9905a43b. Let's make the
remaining backlight_ops instances const.

Inspired by hunks of the grsecurity patch, updated for newer kernels.

Signed-off-by: default avatarLionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 073ef1f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ static int acpi_video_set_brightness(struct backlight_device *bd)
				vd->brightness->levels[request_level]);
}

static struct backlight_ops acpi_backlight_ops = {
static const struct backlight_ops acpi_backlight_ops = {
	.get_brightness = acpi_video_get_brightness,
	.update_status  = acpi_video_set_brightness,
};
+2 −2
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@

#define MAX_PMU_LEVEL 0xFF

static struct backlight_ops pmu_backlight_data;
static const struct backlight_ops pmu_backlight_data;
static DEFINE_SPINLOCK(pmu_backlight_lock);
static int sleeping, uses_pmu_bl;
static u8 bl_curve[FB_BACKLIGHT_LEVELS];
@@ -115,7 +115,7 @@ static int pmu_backlight_get_brightness(struct backlight_device *bd)
	return bd->props.brightness;
}

static struct backlight_ops pmu_backlight_data = {
static const struct backlight_ops pmu_backlight_data = {
	.get_brightness	= pmu_backlight_get_brightness,
	.update_status	= pmu_backlight_update_status,

+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ static int update_bl_status(struct backlight_device *bd)
	return 0;
}

static struct backlight_ops acer_bl_ops = {
static const struct backlight_ops acer_bl_ops = {
	.get_brightness = read_brightness,
	.update_status = update_bl_status,
};
+1 −1
Original line number Diff line number Diff line
@@ -621,7 +621,7 @@ static int update_bl_status(struct backlight_device *bd)
	return asus_lcd_set(asus, value);
}

static struct backlight_ops asusbl_ops = {
static const struct backlight_ops asusbl_ops = {
	.get_brightness = asus_read_brightness,
	.update_status = update_bl_status,
};
Loading