aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2015-06-09 05:17:07 -0400
committerLee Jones <lee.jones@linaro.org>2015-06-22 07:25:30 -0400
commit1abf25a25b86dcfe28d243a5af71bd1c9d6de1ef (patch)
treea7b19d8cc23079f8b9c6cedbefc0250ab7952fa4
parentef76cc5bae0be6e382af0596fc9eb59d0546d50b (diff)
mfd: lpc_ich: Assign subdevice ids automatically
Using -1 as platform device id means that the platform driver core will not assign any id to the device (the device name will not have id at all). This results problems on systems that have multiple PCHs (Platform Controller HUBs) because all of them also include their own copy of LPC device. All the subsequent device creations will fail because there already exists platform device with the same name. Fix this by passing PLATFORM_DEVID_AUTO as platform device id. This makes the platform device core to allocate new ids automatically. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/lpc_ich.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index 12d960a60ec4..8de34398abc0 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -934,8 +934,8 @@ gpe0_done:
934 lpc_ich_enable_gpio_space(dev); 934 lpc_ich_enable_gpio_space(dev);
935 935
936 lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_GPIO]); 936 lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_GPIO]);
937 ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_GPIO], 937 ret = mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
938 1, NULL, 0, NULL); 938 &lpc_ich_cells[LPC_GPIO], 1, NULL, 0, NULL);
939 939
940gpio_done: 940gpio_done:
941 if (acpi_conflict) 941 if (acpi_conflict)
@@ -1008,8 +1008,8 @@ static int lpc_ich_init_wdt(struct pci_dev *dev)
1008 } 1008 }
1009 1009
1010 lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_WDT]); 1010 lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_WDT]);
1011 ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_WDT], 1011 ret = mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
1012 1, NULL, 0, NULL); 1012 &lpc_ich_cells[LPC_WDT], 1, NULL, 0, NULL);
1013 1013
1014wdt_done: 1014wdt_done:
1015 return ret; 1015 return ret;