diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-06-27 16:56:56 -0600 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 23:27:05 +0200 |
commit | 20bfdbba7212d19613b93dcea93f26cb65af91fe (patch) | |
tree | ae75729ddb1cb82931d740fd6a812f295749f706 /drivers/pnp | |
parent | 9fdee4e02e3b214cde8e4f3beb6776075a3d08a7 (diff) | |
download | linux-20bfdbba7212d19613b93dcea93f26cb65af91fe.tar.bz2 |
PNP: make pnp_{port,mem,etc}_start(), et al work for invalid resources
Some callers use pnp_port_start() and similar functions without
making sure the resource is valid. This patch makes us fall
back to returning the initial values if the resource is not
valid or not even present.
This mostly preserves the previous behavior, where we would just
return the initial values set by pnp_init_resource_table(). The
original 2.6.25 code didn't range-check the "bar", so it would
return garbage if the bar exceeded the table size. This code
returns sensible values instead.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/pnp')
0 files changed, 0 insertions, 0 deletions