Add patch accepted for 2.6.26-rc5
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.26-rc5 / 0001-acpi-fix-sparse-const-errors.patch
blobdc9c7db113f543548deee94e0a3ee3342c317794
1 From e3aa51fecdc941c859ed0515084323d3f997aa4a Mon Sep 17 00:00:00 2001
2 From: Harvey Harrison <harvey.harrison@gmail.com>
3 Date: Thu, 29 May 2008 17:51:57 -0700
4 Subject: acpi: fix sparse const errors
6 In this case we want a constant pointer to constant chars:
8 drivers/misc/thinkpad_acpi.c:3824:19: error: Just how const do you want this type to be?
10 Like the error says.
12 drivers/misc/thinkpad_acpi.c:3863:19: error: Just how const do you want this type to be?
13 drivers/misc/thinkpad_acpi.c:3864:19: error: Just how const do you want this type to be?
14 drivers/misc/thinkpad_acpi.c:3865:19: error: Just how const do you want this type to be?
15 drivers/misc/thinkpad_acpi.c:3866:19: error: Just how const do you want this type to be?
17 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
18 Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
19 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
20 ---
21 drivers/misc/thinkpad_acpi.c | 10 +++++-----
22 1 files changed, 5 insertions(+), 5 deletions(-)
24 diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
25 index 3f28f6e..a0ce0b2 100644
26 --- a/drivers/misc/thinkpad_acpi.c
27 +++ b/drivers/misc/thinkpad_acpi.c
28 @@ -3821,7 +3821,7 @@ TPACPI_HANDLE(led, ec, "SLED", /* 570 */
29 #define TPACPI_LED_NUMLEDS 8
30 static struct tpacpi_led_classdev *tpacpi_leds;
31 static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS];
32 -static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
33 +static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
34 /* there's a limit of 19 chars + NULL before 2.6.26 */
35 "tpacpi::power",
36 "tpacpi:orange:batt",
37 @@ -3860,10 +3860,10 @@ static int led_get_status(unsigned int led)
38 static int led_set_status(unsigned int led, enum led_status_t ledstatus)
40 /* off, on, blink. Index is led_status_t */
41 - static const int const led_sled_arg1[] = { 0, 1, 3 };
42 - static const int const led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */
43 - static const int const led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */
44 - static const int const led_led_arg1[] = { 0, 0x80, 0xc0 };
45 + static const int led_sled_arg1[] = { 0, 1, 3 };
46 + static const int led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */
47 + static const int led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */
48 + static const int led_led_arg1[] = { 0, 0x80, 0xc0 };
50 int rc = 0;
52 --
53 1.5.5.2