summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/intel/pinctrl-baytrail.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-08-30 19:27:39 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-08-31 12:25:07 +0300
commit61db6c9db384f5d35960ab1a24998129fa3ff091 (patch)
tree062837aecab57781cd33a6d8ff1862c1e71aee38 /drivers/pinctrl/intel/pinctrl-baytrail.c
parent79b7d19ebaf6ca2e60826cbdd4c5a0f0a414694c (diff)
downloadlinux-61db6c9db384f5d35960ab1a24998129fa3ff091.tar.xz
pinctrl: baytrail: Convert to use device_get_match_data()
Get rid of code duplication by converting to use device_get_match_data(). 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-baytrail.c')
-rw-r--r--drivers/pinctrl/intel/pinctrl-baytrail.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index f38d596efa05..8aa03d102086 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -18,6 +18,8 @@
#include <linux/seq_file.h>
#include <linux/io.h>
#include <linux/pm_runtime.h>
+#include <linux/property.h>
+
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
#include <linux/pinctrl/pinconf.h>
@@ -1781,7 +1783,6 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
{
const struct byt_pinctrl_soc_data *soc_data = NULL;
const struct byt_pinctrl_soc_data **soc_table;
- const struct acpi_device_id *acpi_id;
struct acpi_device *acpi_dev;
struct byt_gpio *vg;
int i, ret;
@@ -1790,11 +1791,7 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
if (!acpi_dev)
return -ENODEV;
- acpi_id = acpi_match_device(byt_gpio_acpi_match, &pdev->dev);
- if (!acpi_id)
- return -ENODEV;
-
- soc_table = (const struct byt_pinctrl_soc_data **)acpi_id->driver_data;
+ soc_table = (const struct byt_pinctrl_soc_data **)device_get_match_data(&pdev->dev);
for (i = 0; soc_table[i]; i++) {
if (!strcmp(acpi_dev->pnp.unique_id, soc_table[i]->uid)) {