[PATCH 2/2] x86/platform/intel-mid: Do not create conflicting platform device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not create "pinctrl-merrifield" platform device on platforms having
ACPI device "INTC1002". That device represents the same device leading
to failures in drivers/pinctrl/intel/pinctrl-merrifield.c and
drivers/gpio/gpio-merrifield.c if "pinctrl-merrifield" is probed first.

Fix this by not creating the "pinctrl-merrifield" in case ACPI device
"INTC1002" is present.

Signed-off-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
---
 .../platform/intel-mid/device_libs/platform_mrfld_pinctrl.c   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
index 43f801b66c1a..5e87f7f90f29 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
@@ -11,6 +11,7 @@
  * of the License.
  */
 
+#include <linux/acpi.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
@@ -35,7 +36,8 @@ static struct platform_device mrfld_pinctrl_device = {
 
 static int __init mrfld_pinctrl_init(void)
 {
-	if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER)
+	if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER &&
+	    !acpi_dev_found("INTC1002"))
 		return platform_device_register(&mrfld_pinctrl_device);
 
 	return -ENODEV;
-- 
2.20.1




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux