summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-02-19 11:07:59 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2010-03-07 22:17:21 +0100
commit91fedede0338eb6203cdd618d8ece873fdb7c22c (patch)
tree89ef0361a9842b0b8762b21445752522ab831d35 /drivers/mfd
parent14e5c82ca32870698b7cbe54196e00682d929ca5 (diff)
mfd: Check for ACPI conflicts
For ACPI based systems, we should check for ACPI conflicts when adding the platform devices. The test will always succeed for non ACPI platforms. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/mfd-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index ae15e495e20e..aa17f4bddc56 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
+#include <linux/acpi.h>
#include <linux/mfd/core.h>
static int mfd_add_device(struct device *parent, int id,
@@ -62,6 +63,10 @@ static int mfd_add_device(struct device *parent, int id,
res[r].start = cell->resources[r].start;
res[r].end = cell->resources[r].end;
}
+
+ ret = acpi_check_resource_conflict(res);
+ if (ret)
+ goto fail_res;
}
platform_device_add_resources(pdev, res, cell->num_resources);