diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-10-06 15:17:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 13:22:32 -0400 |
commit | 08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7 (patch) | |
tree | f3643293843c8f03f148fd9e080b961c0575d4ae /drivers/char | |
parent | 1f6684235825684b6257b7169b122011494c8a4d (diff) |
ipmi/of: Don't use unavailable interfaces
If an IPMI controller is used by the firmware and as such marked with
a reserved status, we shouldn't use it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 5d665680ae33..4fc89310bfb5 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2658,6 +2658,9 @@ static int ipmi_probe(struct platform_device *dev) | |||
2658 | if (!match) | 2658 | if (!match) |
2659 | return -EINVAL; | 2659 | return -EINVAL; |
2660 | 2660 | ||
2661 | if (!of_device_is_available(np)) | ||
2662 | return -EINVAL; | ||
2663 | |||
2661 | ret = of_address_to_resource(np, 0, &resource); | 2664 | ret = of_address_to_resource(np, 0, &resource); |
2662 | if (ret) { | 2665 | if (ret) { |
2663 | dev_warn(&dev->dev, PFX "invalid address from OF\n"); | 2666 | dev_warn(&dev->dev, PFX "invalid address from OF\n"); |