mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
ACPI: autoload modules - Create ACPI alias interface
Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias like: grep acpi /lib/modules/2.6.22-rc4-default/modules.alias alias acpi*:SNY5001:* sony_laptop alias acpi*:SNY6001:* sony_laptop for e.g. the sony_laptop module. This module matches against all ACPI devices with a HID or CID of SNY5001 or SNY6001 Export an uevent and modalias sysfs file containing the string: [MODALIAS=]acpi:PNP0C0C: additional CIDs are concatenated at the end. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
8c8eb78f67
commit
29b71a1ca7
5 changed files with 142 additions and 52 deletions
|
@ -290,6 +290,14 @@ static int do_serio_entry(const char *filename,
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* looks like: "acpi:ACPI0003 or acpi:PNP0C0B" or "acpi:LNXVIDEO" */
|
||||
static int do_acpi_entry(const char *filename,
|
||||
struct acpi_device_id *id, char *alias)
|
||||
{
|
||||
sprintf(alias, "acpi*:%s:", id->id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* looks like: "pnp:dD" */
|
||||
static int do_pnp_entry(const char *filename,
|
||||
struct pnp_device_id *id, char *alias)
|
||||
|
@ -551,6 +559,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
|
|||
do_table(symval, sym->st_size,
|
||||
sizeof(struct serio_device_id), "serio",
|
||||
do_serio_entry, mod);
|
||||
else if (sym_is(symname, "__mod_acpi_device_table"))
|
||||
do_table(symval, sym->st_size,
|
||||
sizeof(struct acpi_device_id), "acpi",
|
||||
do_acpi_entry, mod);
|
||||
else if (sym_is(symname, "__mod_pnp_device_table"))
|
||||
do_table(symval, sym->st_size,
|
||||
sizeof(struct pnp_device_id), "pnp",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue