|
@@ -6,7 +6,7 @@
|
|
|
* Author: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
*/
|
|
|
|
|
|
-#include <linux/acpi.h>
|
|
|
+#include <linux/mod_devicetable.h>
|
|
|
#include <linux/module.h>
|
|
|
#include <linux/platform_device.h>
|
|
|
#include <linux/pm.h>
|
|
@@ -1008,44 +1008,7 @@ static const struct platform_device_id bxt_pinctrl_platform_ids[] = {
|
|
|
|
|
|
static int bxt_pinctrl_probe(struct platform_device *pdev)
|
|
|
{
|
|
|
- const struct intel_pinctrl_soc_data *soc_data = NULL;
|
|
|
- const struct intel_pinctrl_soc_data **soc_table;
|
|
|
- struct acpi_device *adev;
|
|
|
- int i;
|
|
|
-
|
|
|
- adev = ACPI_COMPANION(&pdev->dev);
|
|
|
- if (adev) {
|
|
|
- const struct acpi_device_id *id;
|
|
|
-
|
|
|
- id = acpi_match_device(bxt_pinctrl_acpi_match, &pdev->dev);
|
|
|
- if (!id)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
- soc_table = (const struct intel_pinctrl_soc_data **)
|
|
|
- id->driver_data;
|
|
|
-
|
|
|
- for (i = 0; soc_table[i]; i++) {
|
|
|
- if (!strcmp(adev->pnp.unique_id, soc_table[i]->uid)) {
|
|
|
- soc_data = soc_table[i];
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- const struct platform_device_id *pid;
|
|
|
-
|
|
|
- pid = platform_get_device_id(pdev);
|
|
|
- if (!pid)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
- soc_table = (const struct intel_pinctrl_soc_data **)
|
|
|
- pid->driver_data;
|
|
|
- soc_data = soc_table[pdev->id];
|
|
|
- }
|
|
|
-
|
|
|
- if (!soc_data)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
- return intel_pinctrl_probe(pdev, soc_data);
|
|
|
+ return intel_pinctrl_probe_by_uid(pdev);
|
|
|
}
|
|
|
|
|
|
static const struct dev_pm_ops bxt_pinctrl_pm_ops = {
|