diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:29:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:29:46 -0500 |
commit | 4e3d0319451805cffa69bdb1352f1c9817bf28bc (patch) | |
tree | ec9426300d73f742d7487142ca1a57ef806002bc /drivers | |
parent | 11d64be6a631236b3b3d21711c7d1a83d9f85904 (diff) | |
parent | f60d63f642d824914677fb40330671117dc39c3b (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: DMI: quirk for FSC ESPRIMO Mobile V5505
ACPI: DMI blacklist updates
pnpacpi: __initdata is not an identifier
ACPI: static acpi_chain_head
ACPI: static acpi_find_dsdt_initrd()
ACPI: static acpi_no_initrd_override_setup()
thinkpad_acpi: static
ACPI suspend: Execute _WAK with the right argument
cpuidle: Add Documentation
ACPI, cpuidle: Clarify C-state description in sysfs
ACPI: fix suspend regression due to idle update
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/blacklist.c | 64 | ||||
-rw-r--r-- | drivers/acpi/event.c | 2 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwsleep.c | 1 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 6 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 19 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 3 | ||||
-rw-r--r-- | drivers/cpuidle/sysfs.c | 14 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 2 |
9 files changed, 96 insertions, 19 deletions
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 9ce983ed60f0..ea92bac42c53 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -186,6 +186,12 @@ static int __init dmi_unknown_osi_linux(const struct dmi_system_id *d) | |||
186 | acpi_dmi_osi_linux(-1, d); /* unknown */ | 186 | acpi_dmi_osi_linux(-1, d); /* unknown */ |
187 | return 0; | 187 | return 0; |
188 | } | 188 | } |
189 | static int __init dmi_disable_osi_vista(const struct dmi_system_id *d) | ||
190 | { | ||
191 | printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident); | ||
192 | acpi_osi_setup("!Windows 2006"); | ||
193 | return 0; | ||
194 | } | ||
189 | 195 | ||
190 | /* | 196 | /* |
191 | * Most BIOS that invoke OSI(Linux) do nothing with it. | 197 | * Most BIOS that invoke OSI(Linux) do nothing with it. |
@@ -228,10 +234,10 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
228 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"), | 234 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"), |
229 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 6460"), | 235 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 6460"), |
230 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 7510"), | 236 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 7510"), |
231 | * DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5220"), | ||
232 | * | 237 | * |
233 | * _OSI(Linux) is a NOP: | 238 | * _OSI(Linux) is a NOP: |
234 | * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), | 239 | * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), |
240 | * DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5220"), | ||
235 | */ | 241 | */ |
236 | { | 242 | { |
237 | .callback = dmi_disable_osi_linux, | 243 | .callback = dmi_disable_osi_linux, |
@@ -327,12 +333,20 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
327 | }, | 333 | }, |
328 | { /* OSI(Linux) effect unknown */ | 334 | { /* OSI(Linux) effect unknown */ |
329 | .callback = dmi_unknown_osi_linux, | 335 | .callback = dmi_unknown_osi_linux, |
330 | .ident = "Dell OP GX620", | 336 | .ident = "Dell OptiPlex GX620", |
331 | .matches = { | 337 | .matches = { |
332 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 338 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
333 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX620"), | 339 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX620"), |
334 | }, | 340 | }, |
335 | }, | 341 | }, |
342 | { /* OSI(Linux) causes some USB initialization to not run */ | ||
343 | .callback = dmi_unknown_osi_linux, | ||
344 | .ident = "Dell OptiPlex 755", | ||
345 | .matches = { | ||
346 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
347 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 755"), | ||
348 | }, | ||
349 | }, | ||
336 | { /* OSI(Linux) effect unknown */ | 350 | { /* OSI(Linux) effect unknown */ |
337 | .callback = dmi_unknown_osi_linux, | 351 | .callback = dmi_unknown_osi_linux, |
338 | .ident = "Dell PE 1900", | 352 | .ident = "Dell PE 1900", |
@@ -342,6 +356,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
342 | }, | 356 | }, |
343 | }, | 357 | }, |
344 | { /* OSI(Linux) is a NOP */ | 358 | { /* OSI(Linux) is a NOP */ |
359 | .callback = dmi_unknown_osi_linux, | ||
360 | .ident = "Dell PE 1950", | ||
361 | .matches = { | ||
362 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
363 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1950"), | ||
364 | }, | ||
365 | }, | ||
366 | { /* OSI(Linux) is a NOP */ | ||
345 | .callback = dmi_disable_osi_linux, | 367 | .callback = dmi_disable_osi_linux, |
346 | .ident = "Dell PE R200", | 368 | .ident = "Dell PE R200", |
347 | .matches = { | 369 | .matches = { |
@@ -357,6 +379,22 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
357 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 390"), | 379 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 390"), |
358 | }, | 380 | }, |
359 | }, | 381 | }, |
382 | { /* OSI(Linux) touches USB */ | ||
383 | .callback = dmi_unknown_osi_linux, | ||
384 | .ident = "Dell PR 390", | ||
385 | .matches = { | ||
386 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
387 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 690"), | ||
388 | }, | ||
389 | }, | ||
390 | { /* OSI(Linux) unknown - ASL looks benign, but may effect dock/SMM */ | ||
391 | .callback = dmi_unknown_osi_linux, | ||
392 | .ident = "Dell PR M4300", | ||
393 | .matches = { | ||
394 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
395 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision M4300"), | ||
396 | }, | ||
397 | }, | ||
360 | { /* OSI(Linux) is a NOP */ | 398 | { /* OSI(Linux) is a NOP */ |
361 | .callback = dmi_disable_osi_linux, | 399 | .callback = dmi_disable_osi_linux, |
362 | .ident = "Dell Vostro 1000", | 400 | .ident = "Dell Vostro 1000", |
@@ -390,10 +428,10 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
390 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1536"), | 428 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1536"), |
391 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1556"), | 429 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1556"), |
392 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 1546"), | 430 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 1546"), |
431 | * DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"), | ||
393 | * _OSI(Linux) unknown effect: | 432 | * _OSI(Linux) unknown effect: |
394 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo M1425"), | 433 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo M1425"), |
395 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo Si 1520"), | 434 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo Si 1520"), |
396 | * DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"), | ||
397 | */ | 435 | */ |
398 | { | 436 | { |
399 | .callback = dmi_disable_osi_linux, | 437 | .callback = dmi_disable_osi_linux, |
@@ -402,6 +440,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
402 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 440 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
403 | }, | 441 | }, |
404 | }, | 442 | }, |
443 | { | ||
444 | .callback = dmi_disable_osi_vista, | ||
445 | .ident = "Fujitsu Siemens", | ||
446 | .matches = { | ||
447 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
448 | DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"), | ||
449 | }, | ||
450 | }, | ||
405 | /* | 451 | /* |
406 | * Disable OSI(Linux) warnings on all "Hewlett-Packard" | 452 | * Disable OSI(Linux) warnings on all "Hewlett-Packard" |
407 | * | 453 | * |
@@ -443,10 +489,11 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
443 | * _OSI(Linux) helps sound | 489 | * _OSI(Linux) helps sound |
444 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"), | 490 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"), |
445 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), | 491 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), |
492 | * _OSI(Linux) has Linux specific hooks | ||
493 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), | ||
446 | * _OSI(Linux) is a NOP: | 494 | * _OSI(Linux) is a NOP: |
447 | * DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), | 495 | * DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), |
448 | * _OSI(Linux) effect unknown | 496 | * DMI_MATCH(DMI_PRODUCT_VERSION, "LENOVO3000 V100"), |
449 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), | ||
450 | */ | 497 | */ |
451 | { | 498 | { |
452 | .callback = dmi_enable_osi_linux, | 499 | .callback = dmi_enable_osi_linux, |
@@ -465,7 +512,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
465 | }, | 512 | }, |
466 | }, | 513 | }, |
467 | { | 514 | { |
468 | .callback = dmi_unknown_osi_linux, | 515 | .callback = dmi_enable_osi_linux, |
469 | .ident = "Lenovo ThinkPad X61", | 516 | .ident = "Lenovo ThinkPad X61", |
470 | .matches = { | 517 | .matches = { |
471 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 518 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
@@ -473,7 +520,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
473 | }, | 520 | }, |
474 | }, | 521 | }, |
475 | { | 522 | { |
476 | .callback = dmi_unknown_osi_linux, | 523 | .callback = dmi_disable_osi_linux, |
477 | .ident = "Lenovo 3000 V100", | 524 | .ident = "Lenovo 3000 V100", |
478 | .matches = { | 525 | .matches = { |
479 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 526 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
@@ -543,8 +590,9 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
543 | * Disable OSI(Linux) warnings on all "Sony Corporation" | 590 | * Disable OSI(Linux) warnings on all "Sony Corporation" |
544 | * | 591 | * |
545 | * _OSI(Linux) is a NOP: | 592 | * _OSI(Linux) is a NOP: |
546 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ650N"), | 593 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-NR11S_S"), |
547 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ38GP_C"), | 594 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ38GP_C"), |
595 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ650N"), | ||
548 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-TZ21MN_N"), | 596 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-TZ21MN_N"), |
549 | * _OSI(Linux) unknown effect: | 597 | * _OSI(Linux) unknown effect: |
550 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ11M"), | 598 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ11M"), |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 5479dc0eeeec..abec1ca94cf4 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -110,7 +110,7 @@ static const struct file_operations acpi_system_event_ops = { | |||
110 | #endif /* CONFIG_ACPI_PROC_EVENT */ | 110 | #endif /* CONFIG_ACPI_PROC_EVENT */ |
111 | 111 | ||
112 | /* ACPI notifier chain */ | 112 | /* ACPI notifier chain */ |
113 | BLOCKING_NOTIFIER_HEAD(acpi_chain_head); | 113 | static BLOCKING_NOTIFIER_HEAD(acpi_chain_head); |
114 | 114 | ||
115 | int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data) | 115 | int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data) |
116 | { | 116 | { |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 058d0be5cbe2..4290e0193097 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -616,6 +616,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
616 | return_ACPI_STATUS(status); | 616 | return_ACPI_STATUS(status); |
617 | } | 617 | } |
618 | 618 | ||
619 | arg.integer.value = sleep_state; | ||
619 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); | 620 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); |
620 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 621 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
621 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); | 622 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 15e602377655..8edba7b678eb 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -325,7 +325,7 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val, | |||
325 | } | 325 | } |
326 | 326 | ||
327 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | 327 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD |
328 | struct acpi_table_header *acpi_find_dsdt_initrd(void) | 328 | static struct acpi_table_header *acpi_find_dsdt_initrd(void) |
329 | { | 329 | { |
330 | struct file *firmware_file; | 330 | struct file *firmware_file; |
331 | mm_segment_t oldfs; | 331 | mm_segment_t oldfs; |
@@ -419,7 +419,7 @@ acpi_os_table_override(struct acpi_table_header * existing_table, | |||
419 | } | 419 | } |
420 | 420 | ||
421 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | 421 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD |
422 | int __init acpi_no_initrd_override_setup(char *s) | 422 | static int __init acpi_no_initrd_override_setup(char *s) |
423 | { | 423 | { |
424 | acpi_no_initrd_override = 1; | 424 | acpi_no_initrd_override = 1; |
425 | return 1; | 425 | return 1; |
@@ -1109,7 +1109,7 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) | |||
1109 | * string starting with '!' disables that string | 1109 | * string starting with '!' disables that string |
1110 | * otherwise string is added to list, augmenting built-in strings | 1110 | * otherwise string is added to list, augmenting built-in strings |
1111 | */ | 1111 | */ |
1112 | static int __init acpi_osi_setup(char *str) | 1112 | int __init acpi_osi_setup(char *str) |
1113 | { | 1113 | { |
1114 | if (str == NULL || *str == '\0') { | 1114 | if (str == NULL || *str == '\0') { |
1115 | printk(KERN_INFO PREFIX "_OSI method disabled\n"); | 1115 | printk(KERN_INFO PREFIX "_OSI method disabled\n"); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 32003fdc91e8..980e1c33e6c5 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -945,11 +945,16 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) | |||
945 | * Otherwise, ignore this info and continue. | 945 | * Otherwise, ignore this info and continue. |
946 | */ | 946 | */ |
947 | cx.entry_method = ACPI_CSTATE_HALT; | 947 | cx.entry_method = ACPI_CSTATE_HALT; |
948 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT"); | ||
948 | } else { | 949 | } else { |
949 | continue; | 950 | continue; |
950 | } | 951 | } |
952 | } else { | ||
953 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x", | ||
954 | cx.address); | ||
951 | } | 955 | } |
952 | 956 | ||
957 | |||
953 | obj = &(element->package.elements[2]); | 958 | obj = &(element->package.elements[2]); |
954 | if (obj->type != ACPI_TYPE_INTEGER) | 959 | if (obj->type != ACPI_TYPE_INTEGER) |
955 | continue; | 960 | continue; |
@@ -1420,6 +1425,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, | |||
1420 | return 0; | 1425 | return 0; |
1421 | 1426 | ||
1422 | local_irq_disable(); | 1427 | local_irq_disable(); |
1428 | |||
1429 | /* Do not access any ACPI IO ports in suspend path */ | ||
1430 | if (acpi_idle_suspend) { | ||
1431 | acpi_safe_halt(); | ||
1432 | local_irq_enable(); | ||
1433 | return 0; | ||
1434 | } | ||
1435 | |||
1423 | if (pr->flags.bm_check) | 1436 | if (pr->flags.bm_check) |
1424 | acpi_idle_update_bm_rld(pr, cx); | 1437 | acpi_idle_update_bm_rld(pr, cx); |
1425 | 1438 | ||
@@ -1643,6 +1656,11 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1643 | return -EINVAL; | 1656 | return -EINVAL; |
1644 | } | 1657 | } |
1645 | 1658 | ||
1659 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { | ||
1660 | dev->states[i].name[0] = '\0'; | ||
1661 | dev->states[i].desc[0] = '\0'; | ||
1662 | } | ||
1663 | |||
1646 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { | 1664 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { |
1647 | cx = &pr->power.states[i]; | 1665 | cx = &pr->power.states[i]; |
1648 | state = &dev->states[count]; | 1666 | state = &dev->states[count]; |
@@ -1659,6 +1677,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1659 | cpuidle_set_statedata(state, cx); | 1677 | cpuidle_set_statedata(state, cx); |
1660 | 1678 | ||
1661 | snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); | 1679 | snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); |
1680 | strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN); | ||
1662 | state->exit_latency = cx->latency; | 1681 | state->exit_latency = cx->latency; |
1663 | state->target_residency = cx->latency * latency_factor; | 1682 | state->target_residency = cx->latency * latency_factor; |
1664 | state->power_usage = cx->power; | 1683 | state->power_usage = cx->power; |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 60f71e6345e3..d73663a52324 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -219,7 +219,8 @@ static void poll_idle_init(struct cpuidle_device *dev) | |||
219 | 219 | ||
220 | cpuidle_set_statedata(state, NULL); | 220 | cpuidle_set_statedata(state, NULL); |
221 | 221 | ||
222 | snprintf(state->name, CPUIDLE_NAME_LEN, "C0 (poll idle)"); | 222 | snprintf(state->name, CPUIDLE_NAME_LEN, "C0"); |
223 | snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE"); | ||
223 | state->exit_latency = 0; | 224 | state->exit_latency = 0; |
224 | state->target_residency = 0; | 225 | state->target_residency = 0; |
225 | state->power_usage = -1; | 226 | state->power_usage = -1; |
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 088ea74edd34..69102ca05685 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -218,16 +218,23 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ | |||
218 | return sprintf(buf, "%u\n", state->_name);\ | 218 | return sprintf(buf, "%u\n", state->_name);\ |
219 | } | 219 | } |
220 | 220 | ||
221 | static ssize_t show_state_name(struct cpuidle_state *state, char *buf) | 221 | #define define_show_state_str_function(_name) \ |
222 | { | 222 | static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ |
223 | return sprintf(buf, "%s\n", state->name); | 223 | { \ |
224 | if (state->_name[0] == '\0')\ | ||
225 | return sprintf(buf, "<null>\n");\ | ||
226 | return sprintf(buf, "%s\n", state->_name);\ | ||
224 | } | 227 | } |
225 | 228 | ||
226 | define_show_state_function(exit_latency) | 229 | define_show_state_function(exit_latency) |
227 | define_show_state_function(power_usage) | 230 | define_show_state_function(power_usage) |
228 | define_show_state_function(usage) | 231 | define_show_state_function(usage) |
229 | define_show_state_function(time) | 232 | define_show_state_function(time) |
233 | define_show_state_str_function(name) | ||
234 | define_show_state_str_function(desc) | ||
235 | |||
230 | define_one_state_ro(name, show_state_name); | 236 | define_one_state_ro(name, show_state_name); |
237 | define_one_state_ro(desc, show_state_desc); | ||
231 | define_one_state_ro(latency, show_state_exit_latency); | 238 | define_one_state_ro(latency, show_state_exit_latency); |
232 | define_one_state_ro(power, show_state_power_usage); | 239 | define_one_state_ro(power, show_state_power_usage); |
233 | define_one_state_ro(usage, show_state_usage); | 240 | define_one_state_ro(usage, show_state_usage); |
@@ -235,6 +242,7 @@ define_one_state_ro(time, show_state_time); | |||
235 | 242 | ||
236 | static struct attribute *cpuidle_state_default_attrs[] = { | 243 | static struct attribute *cpuidle_state_default_attrs[] = { |
237 | &attr_name.attr, | 244 | &attr_name.attr, |
245 | &attr_desc.attr, | ||
238 | &attr_latency.attr, | 246 | &attr_latency.attr, |
239 | &attr_power.attr, | 247 | &attr_power.attr, |
240 | &attr_usage.attr, | 248 | &attr_usage.attr, |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 7ba1acad5402..e2c7edd206a6 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -1689,7 +1689,7 @@ static ssize_t hotkey_wakeup_reason_show(struct device *dev, | |||
1689 | static struct device_attribute dev_attr_hotkey_wakeup_reason = | 1689 | static struct device_attribute dev_attr_hotkey_wakeup_reason = |
1690 | __ATTR(wakeup_reason, S_IRUGO, hotkey_wakeup_reason_show, NULL); | 1690 | __ATTR(wakeup_reason, S_IRUGO, hotkey_wakeup_reason_show, NULL); |
1691 | 1691 | ||
1692 | void hotkey_wakeup_reason_notify_change(void) | 1692 | static void hotkey_wakeup_reason_notify_change(void) |
1693 | { | 1693 | { |
1694 | if (tp_features.hotkey_mask) | 1694 | if (tp_features.hotkey_mask) |
1695 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, | 1695 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, |
@@ -1708,7 +1708,7 @@ static struct device_attribute dev_attr_hotkey_wakeup_hotunplug_complete = | |||
1708 | __ATTR(wakeup_hotunplug_complete, S_IRUGO, | 1708 | __ATTR(wakeup_hotunplug_complete, S_IRUGO, |
1709 | hotkey_wakeup_hotunplug_complete_show, NULL); | 1709 | hotkey_wakeup_hotunplug_complete_show, NULL); |
1710 | 1710 | ||
1711 | void hotkey_wakeup_hotunplug_complete_notify_change(void) | 1711 | static void hotkey_wakeup_hotunplug_complete_notify_change(void) |
1712 | { | 1712 | { |
1713 | if (tp_features.hotkey_mask) | 1713 | if (tp_features.hotkey_mask) |
1714 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, | 1714 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 662b4c279cfc..c283a9a70d83 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -36,7 +36,7 @@ static int num = 0; | |||
36 | * have irqs (PIC, Timer) because we call acpi_register_gsi. | 36 | * have irqs (PIC, Timer) because we call acpi_register_gsi. |
37 | * Finally, only devices that have a CRS method need to be in this list. | 37 | * Finally, only devices that have a CRS method need to be in this list. |
38 | */ | 38 | */ |
39 | static struct __initdata acpi_device_id excluded_id_list[] = { | 39 | static struct acpi_device_id excluded_id_list[] __initdata = { |
40 | {"PNP0C09", 0}, /* EC */ | 40 | {"PNP0C09", 0}, /* EC */ |
41 | {"PNP0C0F", 0}, /* Link device */ | 41 | {"PNP0C0F", 0}, /* Link device */ |
42 | {"PNP0000", 0}, /* PIC */ | 42 | {"PNP0000", 0}, /* PIC */ |