diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-09-22 16:04:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-22 20:22:38 -0400 |
commit | a9e31765e7d528858e1b0c202b823cf4df7577ca (patch) | |
tree | fa5da504a780ee8447d6aaf2c5701dcff3ed4f4f | |
parent | f19e8aa11afa24036c6273428da51949b5acf30c (diff) |
ipmi: fix acpi probe print
After d9e1b6c45059ccf ("ipmi: fix ACPI detection with regspacing") we get
[ 11.026326] ipmi_si: probing via ACPI
[ 11.030019] ipmi_si 00:09: (null) regsize 1 spacing 1 irq 0
[ 11.035594] ipmi_si: Adding ACPI-specified kcs state machine
on an old system with only one range for ipmi kcs range.
Try to fix it by adding another res pointer.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 3822b4f49c84..2be457a0c0c3 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2126,7 +2126,7 @@ static int __devinit ipmi_pnp_probe(struct pnp_dev *dev, | |||
2126 | { | 2126 | { |
2127 | struct acpi_device *acpi_dev; | 2127 | struct acpi_device *acpi_dev; |
2128 | struct smi_info *info; | 2128 | struct smi_info *info; |
2129 | struct resource *res; | 2129 | struct resource *res, *res_second; |
2130 | acpi_handle handle; | 2130 | acpi_handle handle; |
2131 | acpi_status status; | 2131 | acpi_status status; |
2132 | unsigned long long tmp; | 2132 | unsigned long long tmp; |
@@ -2182,13 +2182,13 @@ static int __devinit ipmi_pnp_probe(struct pnp_dev *dev, | |||
2182 | info->io.addr_data = res->start; | 2182 | info->io.addr_data = res->start; |
2183 | 2183 | ||
2184 | info->io.regspacing = DEFAULT_REGSPACING; | 2184 | info->io.regspacing = DEFAULT_REGSPACING; |
2185 | res = pnp_get_resource(dev, | 2185 | res_second = pnp_get_resource(dev, |
2186 | (info->io.addr_type == IPMI_IO_ADDR_SPACE) ? | 2186 | (info->io.addr_type == IPMI_IO_ADDR_SPACE) ? |
2187 | IORESOURCE_IO : IORESOURCE_MEM, | 2187 | IORESOURCE_IO : IORESOURCE_MEM, |
2188 | 1); | 2188 | 1); |
2189 | if (res) { | 2189 | if (res_second) { |
2190 | if (res->start > info->io.addr_data) | 2190 | if (res_second->start > info->io.addr_data) |
2191 | info->io.regspacing = res->start - info->io.addr_data; | 2191 | info->io.regspacing = res_second->start - info->io.addr_data; |
2192 | } | 2192 | } |
2193 | info->io.regsize = DEFAULT_REGSPACING; | 2193 | info->io.regsize = DEFAULT_REGSPACING; |
2194 | info->io.regshift = 0; | 2194 | info->io.regshift = 0; |