mfd: Fix ACPI conflict check
PATCH 1/1 mfd: Fix ACPI conflict check
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.
---
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(-)
drivers/mfd/mfd-core.c +1 -1
@@ -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; }
Signature · 1 line
Jean Delvare
Hi Jean,
Quoted 6 lines · Jean Delvare
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.
Thanks for catching this one. Applied to both my for-next and for-linus branches.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/