aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-07-08 20:34:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-08 20:34:51 -0400
commit883a2dfd6f13eca5aab30f0bcc9a6f1e2f983b1e (patch)
tree0e1154fe7cff7ae646bd89b1e2f6c30aaa877d13 /scripts/mod
parent331c5841ddbb4cf3034ffc425a70f42acc5cdaff (diff)
parent8076ca480f40c51ab87d8301c830a817b900b4d1 (diff)
Merge tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI updates from Rafael Wysocki: "These are fixes on top of the previous PM+ACPI pull requests (including one fix for a 4.1 regression) and two commits adding _CLS-based device enumeration support to the ACPI core and the ATA subsystem that waited for the latest ACPICA changes to be merged. Specifics: - Fix for an ACPI resources management regression introduced during the 4.1 cycle (that unfortunately went into -stable) effectively reverting the bad commit along with the recent fixups on top of it and using an alternative approach to address the underlying issue (Rafael J Wysocki). - Fix for a memory leak and an incorrect return value in an error code path in the ACPI LPSS (Low-Power Subsystem) driver (Rafael J Wysocki). - Fix for a leftover dangling pointer in an error code path in the new wakeup IRQ support code (Rafael J Wysocki). - Fix to prevent infinite loops (due to errors in other places) from happening in the core generic PM domains support code (Geert Uytterhoeven). - Hibernation documentation update/clarification (Uwe Geuder). - Support for _CLS-based device enumeration in the ACPI core and in the ATA subsystem (Suravee Suthikulpanit)" * tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / wakeirq: Avoid setting power.wakeirq too hastily ata: ahci_platform: Add ACPI _CLS matching ACPI / scan: Add support for ACPI _CLS device matching PM / hibernate: clarify resume documentation PM / Domains: Avoid infinite loops in attach/detach code ACPI / LPSS: Fix up acpi_lpss_create_device() ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/devicetable-offsets.c2
-rw-r--r--scripts/mod/file2alias.c32
2 files changed, 32 insertions, 2 deletions
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c
index eff7de1fc82e..e70fcd12eeeb 100644
--- a/scripts/mod/devicetable-offsets.c
+++ b/scripts/mod/devicetable-offsets.c
@@ -63,6 +63,8 @@ int main(void)
63 63
64 DEVID(acpi_device_id); 64 DEVID(acpi_device_id);
65 DEVID_FIELD(acpi_device_id, id); 65 DEVID_FIELD(acpi_device_id, id);
66 DEVID_FIELD(acpi_device_id, cls);
67 DEVID_FIELD(acpi_device_id, cls_msk);
66 68
67 DEVID(pnp_device_id); 69 DEVID(pnp_device_id);
68 DEVID_FIELD(pnp_device_id, id); 70 DEVID_FIELD(pnp_device_id, id);
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 84c86f3cd6cd..5f2088209132 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -523,12 +523,40 @@ static int do_serio_entry(const char *filename,
523} 523}
524ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry); 524ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry);
525 525
526/* looks like: "acpi:ACPI0003 or acpi:PNP0C0B" or "acpi:LNXVIDEO" */ 526/* looks like: "acpi:ACPI0003" or "acpi:PNP0C0B" or "acpi:LNXVIDEO" or
527 * "acpi:bbsspp" (bb=base-class, ss=sub-class, pp=prog-if)
528 *
529 * NOTE: Each driver should use one of the following : _HID, _CIDs
530 * or _CLS. Also, bb, ss, and pp can be substituted with ??
531 * as don't care byte.
532 */
527static int do_acpi_entry(const char *filename, 533static int do_acpi_entry(const char *filename,
528 void *symval, char *alias) 534 void *symval, char *alias)
529{ 535{
530 DEF_FIELD_ADDR(symval, acpi_device_id, id); 536 DEF_FIELD_ADDR(symval, acpi_device_id, id);
531 sprintf(alias, "acpi*:%s:*", *id); 537 DEF_FIELD_ADDR(symval, acpi_device_id, cls);
538 DEF_FIELD_ADDR(symval, acpi_device_id, cls_msk);
539
540 if (id && strlen((const char *)*id))
541 sprintf(alias, "acpi*:%s:*", *id);
542 else if (cls) {
543 int i, byte_shift, cnt = 0;
544 unsigned int msk;
545
546 sprintf(&alias[cnt], "acpi*:");
547 cnt = 6;
548 for (i = 1; i <= 3; i++) {
549 byte_shift = 8 * (3-i);
550 msk = (*cls_msk >> byte_shift) & 0xFF;
551 if (msk)
552 sprintf(&alias[cnt], "%02x",
553 (*cls >> byte_shift) & 0xFF);
554 else
555 sprintf(&alias[cnt], "??");
556 cnt += 2;
557 }
558 sprintf(&alias[cnt], ":*");
559 }
532 return 1; 560 return 1;
533} 561}
534ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry); 562ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry);