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/platform/x86 | |
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/platform/x86')
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/asus_acpi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index c8c65375bfe2..1d0b707aeafc 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -915,7 +915,7 @@ static int update_bl_status(struct backlight_device *bd) | |||
915 | return 0; | 915 | return 0; |
916 | } | 916 | } |
917 | 917 | ||
918 | static struct backlight_ops acer_bl_ops = { | 918 | static const struct backlight_ops acer_bl_ops = { |
919 | .get_brightness = read_brightness, | 919 | .get_brightness = read_brightness, |
920 | .update_status = update_bl_status, | 920 | .update_status = update_bl_status, |
921 | }; | 921 | }; |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 60a5a5c6b50a..3640599446fc 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -621,7 +621,7 @@ static int update_bl_status(struct backlight_device *bd) | |||
621 | return asus_lcd_set(asus, value); | 621 | return asus_lcd_set(asus, value); |
622 | } | 622 | } |
623 | 623 | ||
624 | static struct backlight_ops asusbl_ops = { | 624 | static const struct backlight_ops asusbl_ops = { |
625 | .get_brightness = asus_read_brightness, | 625 | .get_brightness = asus_read_brightness, |
626 | .update_status = update_bl_status, | 626 | .update_status = update_bl_status, |
627 | }; | 627 | }; |
diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c index ca05aefd03bf..4633fd8532cc 100644 --- a/drivers/platform/x86/asus_acpi.c +++ b/drivers/platform/x86/asus_acpi.c | |||
@@ -1467,7 +1467,7 @@ static int asus_hotk_remove(struct acpi_device *device, int type) | |||
1467 | return 0; | 1467 | return 0; |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | static struct backlight_ops asus_backlight_data = { | 1470 | static const struct backlight_ops asus_backlight_data = { |
1471 | .get_brightness = read_brightness, | 1471 | .get_brightness = read_brightness, |
1472 | .update_status = set_brightness_status, | 1472 | .update_status = set_brightness_status, |
1473 | }; | 1473 | }; |
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index cf8a89a0d8f5..34657f96b5a5 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -546,7 +546,7 @@ out: | |||
546 | return buffer->output[1]; | 546 | return buffer->output[1]; |
547 | } | 547 | } |
548 | 548 | ||
549 | static struct backlight_ops dell_ops = { | 549 | static const struct backlight_ops dell_ops = { |
550 | .get_brightness = dell_get_intensity, | 550 | .get_brightness = dell_get_intensity, |
551 | .update_status = dell_send_intensity, | 551 | .update_status = dell_send_intensity, |
552 | }; | 552 | }; |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index b2edfdcdcb84..c062a6534590 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -1115,7 +1115,7 @@ static int update_bl_status(struct backlight_device *bd) | |||
1115 | return set_brightness(bd, bd->props.brightness); | 1115 | return set_brightness(bd, bd->props.brightness); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | static struct backlight_ops eeepcbl_ops = { | 1118 | static const struct backlight_ops eeepcbl_ops = { |
1119 | .get_brightness = read_brightness, | 1119 | .get_brightness = read_brightness, |
1120 | .update_status = update_bl_status, | 1120 | .update_status = update_bl_status, |
1121 | }; | 1121 | }; |
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index f44cd2620ff9..34d0dc590d76 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -437,7 +437,7 @@ static int bl_update_status(struct backlight_device *b) | |||
437 | return ret; | 437 | return ret; |
438 | } | 438 | } |
439 | 439 | ||
440 | static struct backlight_ops fujitsubl_ops = { | 440 | static const struct backlight_ops fujitsubl_ops = { |
441 | .get_brightness = bl_get_brightness, | 441 | .get_brightness = bl_get_brightness, |
442 | .update_status = bl_update_status, | 442 | .update_status = bl_update_status, |
443 | }; | 443 | }; |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index f200677851b8..f8b2fc992276 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -856,7 +856,7 @@ static int sony_backlight_get_brightness(struct backlight_device *bd) | |||
856 | } | 856 | } |
857 | 857 | ||
858 | static struct backlight_device *sony_backlight_device; | 858 | static struct backlight_device *sony_backlight_device; |
859 | static struct backlight_ops sony_backlight_ops = { | 859 | static const struct backlight_ops sony_backlight_ops = { |
860 | .update_status = sony_backlight_update_status, | 860 | .update_status = sony_backlight_update_status, |
861 | .get_brightness = sony_backlight_get_brightness, | 861 | .get_brightness = sony_backlight_get_brightness, |
862 | }; | 862 | }; |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 304333faf441..efda9c54e0e2 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -6109,7 +6109,7 @@ static void tpacpi_brightness_notify_change(void) | |||
6109 | BACKLIGHT_UPDATE_HOTKEY); | 6109 | BACKLIGHT_UPDATE_HOTKEY); |
6110 | } | 6110 | } |
6111 | 6111 | ||
6112 | static struct backlight_ops ibm_backlight_data = { | 6112 | static const struct backlight_ops ibm_backlight_data = { |
6113 | .get_brightness = brightness_get, | 6113 | .get_brightness = brightness_get, |
6114 | .update_status = brightness_update_status, | 6114 | .update_status = brightness_update_status, |
6115 | }; | 6115 | }; |
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 06f304f46e02..81bca5a4d8aa 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -840,7 +840,7 @@ static void remove_toshiba_proc_entries(void) | |||
840 | remove_proc_entry("version", toshiba_proc_dir); | 840 | remove_proc_entry("version", toshiba_proc_dir); |
841 | } | 841 | } |
842 | 842 | ||
843 | static struct backlight_ops toshiba_backlight_data = { | 843 | static const struct backlight_ops toshiba_backlight_data = { |
844 | .get_brightness = get_lcd, | 844 | .get_brightness = get_lcd, |
845 | .update_status = set_lcd_status, | 845 | .update_status = set_lcd_status, |
846 | }; | 846 | }; |