mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: minyard@acm.org
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	OpenIPMI Developers <openipmi-developer@lists.sourceforge.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Corey Minyard <cminyard@mvista.com>
Subject: [PATCH 2/4] ipmi/of: Don't use unavailable interfaces
Date: Mon,  6 Oct 2014 14:17:51 -0500	[thread overview]
Message-ID: <1412623073-6166-3-git-send-email-minyard@acm.org> (raw)
In-Reply-To: <1412623073-6166-1-git-send-email-minyard@acm.org>

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

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>
---
 drivers/char/ipmi/ipmi_si_intf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 5d66568..4fc8931 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)
 	if (!match)
 		return -EINVAL;
 
+	if (!of_device_is_available(np))
+		return -EINVAL;
+
 	ret = of_address_to_resource(np, 0, &resource);
 	if (ret) {
 		dev_warn(&dev->dev, PFX "invalid address from OF\n");
-- 
1.8.3.1


  parent reply	other threads:[~2014-10-06 19:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 19:17 [PATCH 0/4] ipmi: various collected bug fixes minyard
2014-10-06 19:17 ` [PATCH 1/4] ipmi: Clean up the error handling for channel config errors minyard
2014-10-06 19:17 ` minyard [this message]
2014-10-06 19:17 ` [PATCH 3/4] ipmi: work around gcc-4.9 build warning minyard
2014-10-06 19:17 ` [PATCH 4/4] ipmi: Clear drvdata when interface is removed minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412623073-6166-3-git-send-email-minyard@acm.org \
    --to=minyard@acm.org \
    --cc=benh@kernel.crashing.org \
    --cc=cminyard@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®