Re: [PATCH 1/1] driver: Tpm hardware enablement --updated version

Greg KH
2004-12-17T23:00:43Z

On Fri, Dec 17, 2004 at 04:47:18PM -0600, Kylene Hall wrote:
> +static struct pci_device_id tpm_pci_tbl[] __devinitdata = {
> + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0)},
> + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12)},
> + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0)},
> + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12)},
> + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0)},
> + {PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_LPC)},
> + {0,}
> +};
> +
> +MODULE_DEVICE_TABLE(pci, tpm_pci_tbl);

Please do not put this in a .h file. It belongs in the .c files. If
both tpm drivers could be on all of the above pci devices, then that's
fine. But odds are, eventually the table will start to differenciate.

This is also not a good idea, as the main tpm core module will end up
with this pci device table, and it should not, as it does not support
any pci devices itself.

thanks,

greg k-h