diff options
-rw-r--r-- | drivers/pinctrl/intel/Kconfig | 6 | ||||
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-baytrail.c | 24 |
2 files changed, 6 insertions, 24 deletions
diff --git a/drivers/pinctrl/intel/Kconfig b/drivers/pinctrl/intel/Kconfig index b3e6060db52d..c7f0d5d9d9d3 100644 --- a/drivers/pinctrl/intel/Kconfig +++ b/drivers/pinctrl/intel/Kconfig @@ -6,11 +6,7 @@ if (X86 || COMPILE_TEST) config PINCTRL_BAYTRAIL bool "Intel Baytrail GPIO pin control" depends on ACPI - select GPIOLIB - select GPIOLIB_IRQCHIP - select PINMUX - select PINCONF - select GENERIC_PINCONF + select PINCTRL_INTEL help driver for memory mapped GPIO functionality on Intel Baytrail platforms. Supports 3 banks with 102, 28 and 44 gpios. diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index d6e35cba3065..d49aab3cfbaa 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -1635,28 +1635,14 @@ static const struct acpi_device_id byt_gpio_acpi_match[] = { static int byt_pinctrl_probe(struct platform_device *pdev) { - const struct intel_pinctrl_soc_data *soc_data = NULL; - const struct intel_pinctrl_soc_data **soc_table; + const struct intel_pinctrl_soc_data *soc_data; struct device *dev = &pdev->dev; - struct acpi_device *acpi_dev; struct intel_pinctrl *vg; - int i, ret; - - acpi_dev = ACPI_COMPANION(dev); - if (!acpi_dev) - return -ENODEV; - - soc_table = (const struct intel_pinctrl_soc_data **)device_get_match_data(dev); - - for (i = 0; soc_table[i]; i++) { - if (!strcmp(acpi_dev->pnp.unique_id, soc_table[i]->uid)) { - soc_data = soc_table[i]; - break; - } - } + int ret; - if (!soc_data) - return -ENODEV; + soc_data = intel_pinctrl_get_soc_data(pdev); + if (IS_ERR(soc_data)) + return PTR_ERR(soc_data); vg = devm_kzalloc(dev, sizeof(*vg), GFP_KERNEL); if (!vg) |