modpost, tpm_tis: Remove wildcard ACPI and PNP aliases
PATCH 1/1 modpost, tpm_tis: Remove wildcard ACPI and PNP aliases
tpm_tis has a 'spare' entry in its device ID table for adding user-specified device IDs. This will be ignored by the driver matching logic, but modpost turns it into:
alias: acpi*::* alias: pnp:d*
This seems to result in the driver being loaded on almost all PCs. Change do_pnp_device_entry() to stop if it finds such an entry, similarly to do_usb_entry_multi().
Signed-off-by Ben Hutchings <[email protected]>
--- scripts/mod/file2alias.c | 8 ++++++++ 1 file changed, 8 insertions(+)
scripts/mod/file2alias.c +8 -0
@@ -535,6 +535,14 @@ static void do_pnp_device_entry(void *symval, unsigned long size,char acpi_id[sizeof (*id)];int j; +/* +* Some modules (tpm_tis) have empty slots as +* placeholder for run-time specification that results +* in catch-all alias +*/ +if (!**id) +return ; +buf_printf (&mod->dev_table_buf,"MODULE_ALIAS(\"pnp:d%s*\");\n" , *id);