From: Henrique de Moraes Holschuh Date: Sat, 31 May 2008 21:00:40 +0000 (-0300) Subject: Add patch accepted for 2.6.26-rc5 X-Git-Url: https://repo.or.cz/w/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git/commitdiff_plain/23a53850705d7853800f59e93e7dd605cd7dd505 Add patch accepted for 2.6.26-rc5 Signed-off-by: Henrique de Moraes Holschuh --- diff --git a/releases/upstream/2.6.26-rc5/0001-acpi-fix-sparse-const-errors.patch b/releases/upstream/2.6.26-rc5/0001-acpi-fix-sparse-const-errors.patch new file mode 100644 index 00000000000..dc9c7db113f --- /dev/null +++ b/releases/upstream/2.6.26-rc5/0001-acpi-fix-sparse-const-errors.patch @@ -0,0 +1,54 @@ +From e3aa51fecdc941c859ed0515084323d3f997aa4a Mon Sep 17 00:00:00 2001 +From: Harvey Harrison +Date: Thu, 29 May 2008 17:51:57 -0700 +Subject: acpi: fix sparse const errors + +In this case we want a constant pointer to constant chars: + +drivers/misc/thinkpad_acpi.c:3824:19: error: Just how const do you want this type to be? + +Like the error says. + +drivers/misc/thinkpad_acpi.c:3863:19: error: Just how const do you want this type to be? +drivers/misc/thinkpad_acpi.c:3864:19: error: Just how const do you want this type to be? +drivers/misc/thinkpad_acpi.c:3865:19: error: Just how const do you want this type to be? +drivers/misc/thinkpad_acpi.c:3866:19: error: Just how const do you want this type to be? + +Signed-off-by: Harvey Harrison +Acked-by: Henrique de Moraes Holschuh +Signed-off-by: Linus Torvalds +--- + drivers/misc/thinkpad_acpi.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c +index 3f28f6e..a0ce0b2 100644 +--- a/drivers/misc/thinkpad_acpi.c ++++ b/drivers/misc/thinkpad_acpi.c +@@ -3821,7 +3821,7 @@ TPACPI_HANDLE(led, ec, "SLED", /* 570 */ + #define TPACPI_LED_NUMLEDS 8 + static struct tpacpi_led_classdev *tpacpi_leds; + static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; +-static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = { ++static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = { + /* there's a limit of 19 chars + NULL before 2.6.26 */ + "tpacpi::power", + "tpacpi:orange:batt", +@@ -3860,10 +3860,10 @@ static int led_get_status(unsigned int led) + static int led_set_status(unsigned int led, enum led_status_t ledstatus) + { + /* off, on, blink. Index is led_status_t */ +- static const int const led_sled_arg1[] = { 0, 1, 3 }; +- static const int const led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ +- static const int const led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ +- static const int const led_led_arg1[] = { 0, 0x80, 0xc0 }; ++ static const int led_sled_arg1[] = { 0, 1, 3 }; ++ static const int led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ ++ static const int led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ ++ static const int led_led_arg1[] = { 0, 0x80, 0xc0 }; + + int rc = 0; + +-- +1.5.5.2 +