[PATCH] tpm: add HID module parameter

I recently found that not all BIOS manufacturers are using the specified
generic PNP id in their TPM ACPI table entry. I have added the vendor
specific IDs that I know about and added a module parameter that a user can
specify another HID to the probe list if their device isn't being found by the
default list.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Kylene Jo Hall and committed by Linus Torvalds 93e1b7d4 57135568

+12 -1
+12 -1
drivers/char/tpm/tpm_tis.c
··· 610 611 static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = { 612 {"PNP0C31", 0}, /* TPM */ 613 - {"", 0} 614 }; 615 616 static struct pnp_driver tis_pnp_driver = { ··· 626 .suspend = tpm_tis_pnp_suspend, 627 .resume = tpm_tis_pnp_resume, 628 }; 629 630 static int __init init_tis(void) 631 {
··· 610 611 static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = { 612 {"PNP0C31", 0}, /* TPM */ 613 + {"ATM1200", 0}, /* Atmel */ 614 + {"IFX0102", 0}, /* Infineon */ 615 + {"BCM0101", 0}, /* Broadcom */ 616 + {"NSC1200", 0}, /* National */ 617 + /* Add new here */ 618 + {"", 0}, /* User Specified */ 619 + {"", 0} /* Terminator */ 620 }; 621 622 static struct pnp_driver tis_pnp_driver = { ··· 620 .suspend = tpm_tis_pnp_suspend, 621 .resume = tpm_tis_pnp_resume, 622 }; 623 + 624 + #define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2 625 + module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id, 626 + sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444); 627 + MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); 628 629 static int __init init_tis(void) 630 {