Skip to content

Commit

Permalink
mfd: Check for ACPI conflicts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Ortiz committed Mar 7, 2010
1 parent 14e5c82 commit 91feded
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/mfd/mfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 91feded

Please sign in to comment.