mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] mfd: Fix ACPI conflict check
Date: Sat, 18 Feb 2012 17:54:23 +0100	[thread overview]
Message-ID: <20120218175423.3f8d6ce6@endymion.delvare> (raw)

The code is currently always checking the first resource of every
device only (several times.) This has been broken since the ACPI check
was added in February 2010 in commit
91fedede0338eb6203cdd618d8ece873fdb7c22c.

Fix the check to run on each resource individually, once.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: stable@vger.kernel.org
---
I still believe that having ACPI checks in mfd-core is wrong to start
with. ACPI conflicts have become so frequent that this check if likely
to get a whole MFD chip to be unusable even if some of ifs functions
would be useable. For this reason I think the ACPI checks should be
the responsibility of the subdrivers. With this fix, even more
conflicts will happen, and I suspect more and more drivers will set
mfd_cell.ignore_resource_conflicts = true.

Still, if we have the check in place, let's do it right.

 drivers/mfd/mfd-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-3.3-rc3.orig/drivers/mfd/mfd-core.c	2012-01-06 11:21:11.000000000 +0100
+++ linux-3.3-rc3/drivers/mfd/mfd-core.c	2012-02-18 17:03:24.854788023 +0100
@@ -123,7 +123,7 @@ static int mfd_add_device(struct device
 		}
 
 		if (!cell->ignore_resource_conflicts) {
-			ret = acpi_check_resource_conflict(res);
+			ret = acpi_check_resource_conflict(&res[r]);
 			if (ret)
 				goto fail_res;
 		}


-- 
Jean Delvare

             reply	other threads:[~2012-02-18 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-18 16:54 Jean Delvare [this message]
2012-02-23 16:35 ` Samuel Ortiz

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=20120218175423.3f8d6ce6@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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®