Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91fedede authored by Samuel Ortiz's avatar Samuel Ortiz
Browse files

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: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 14e5c82c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@


#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/acpi.h>
#include <linux/mfd/core.h>
#include <linux/mfd/core.h>


static int mfd_add_device(struct device *parent, int id,
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].start = cell->resources[r].start;
			res[r].end   = cell->resources[r].end;
			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);
	platform_device_add_resources(pdev, res, cell->num_resources);