Commit 1abf25a2 authored by Mika Westerberg's avatar Mika Westerberg Committed by Lee Jones

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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent ef76cc5b
...@@ -934,8 +934,8 @@ static int lpc_ich_init_gpio(struct pci_dev *dev) ...@@ -934,8 +934,8 @@ static int lpc_ich_init_gpio(struct pci_dev *dev)
lpc_ich_enable_gpio_space(dev); lpc_ich_enable_gpio_space(dev);
lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_GPIO]); lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_GPIO]);
ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_GPIO], ret = mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
1, NULL, 0, NULL); &lpc_ich_cells[LPC_GPIO], 1, NULL, 0, NULL);
gpio_done: gpio_done:
if (acpi_conflict) if (acpi_conflict)
...@@ -1008,8 +1008,8 @@ static int lpc_ich_init_wdt(struct pci_dev *dev) ...@@ -1008,8 +1008,8 @@ static int lpc_ich_init_wdt(struct pci_dev *dev)
} }
lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_WDT]); lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_WDT]);
ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_WDT], ret = mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
1, NULL, 0, NULL); &lpc_ich_cells[LPC_WDT], 1, NULL, 0, NULL);
wdt_done: wdt_done:
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment