diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-08-30 18:27:38 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-08-31 11:25:03 +0200 |
commit | 79b7d19ebaf6ca2e60826cbdd4c5a0f0a414694c (patch) | |
tree | 9c9ed012751243d952987eb0740030db573635e0 /drivers/pinctrl/intel/pinctrl-geminilake.c | |
parent | pinctrl: broxton: Convert to use intel_pinctrl_probe_by_uid() (diff) | |
download | linux-79b7d19ebaf6ca2e60826cbdd4c5a0f0a414694c.tar.xz linux-79b7d19ebaf6ca2e60826cbdd4c5a0f0a414694c.zip |
pinctrl: geminilake: Convert to use intel_pinctrl_probe_by_uid()
Get rid of code duplication by converting to use intel_pinctrl_probe_by_uid().
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-geminilake.c')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-geminilake.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-geminilake.c b/drivers/pinctrl/intel/pinctrl-geminilake.c index 5c4c96752fc1..10452e36df73 100644 --- a/drivers/pinctrl/intel/pinctrl-geminilake.c +++ b/drivers/pinctrl/intel/pinctrl-geminilake.c @@ -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> @@ -449,33 +449,14 @@ static const struct intel_pinctrl_soc_data *glk_pinctrl_soc_data[] = { }; static const struct acpi_device_id glk_pinctrl_acpi_match[] = { - { "INT3453" }, + { "INT3453", (kernel_ulong_t)glk_pinctrl_soc_data }, { } }; MODULE_DEVICE_TABLE(acpi, glk_pinctrl_acpi_match); static int glk_pinctrl_probe(struct platform_device *pdev) { - const struct intel_pinctrl_soc_data *soc_data = NULL; - struct acpi_device *adev; - int i; - - adev = ACPI_COMPANION(&pdev->dev); - if (!adev) - return -ENODEV; - - for (i = 0; glk_pinctrl_soc_data[i]; i++) { - if (!strcmp(adev->pnp.unique_id, - glk_pinctrl_soc_data[i]->uid)) { - soc_data = glk_pinctrl_soc_data[i]; - break; - } - } - - 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 glk_pinctrl_pm_ops = { |