lkml.org 
[lkml]   [2005]   [Oct]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 26 Oct 2005 21:53:47 +0200
FromMarcel Selhorst <>
SubjectRe: [PATCH] Infineon TPM: move infineon driver off pci_dev
Hi Matthieu,

>> +    /* read IO-ports through PnP */
>> +    if (pnp_port_valid(dev, 0) &&
>> +        !(pnp_port_flags(dev, 0) & IORESOURCE_DISABLED)) {
>> +        TPM_INF_ADDR = pnp_port_start(dev, 0);
>> +        TPM_INF_DATA = (TPM_INF_ADDR + 1);
>> +        TPM_INF_BASE = pnp_port_start(dev, 1);
> 
> You should add a pnp_port_valid(dev, 1) check.
> If you are paranoid, you could also check the port len.
> 
> I don't remember if it is done somewhere, but a request_region should be
> used.

Thanks for that good hint, I'll take care of that tomorrow
and submit a new patch here.

Marcel Selhorst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-26 19:56    [from the cache]
©2003-2008