diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 9c267dcda094..b8b3d932cd73 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c | |||
@@ -1270,8 +1270,6 @@ static void pcs_free_resources(struct pcs_device *pcs) | |||
1270 | #endif | 1270 | #endif |
1271 | } | 1271 | } |
1272 | 1272 | ||
1273 | static const struct of_device_id pcs_of_match[]; | ||
1274 | |||
1275 | static int pcs_add_gpio_func(struct device_node *node, struct pcs_device *pcs) | 1273 | static int pcs_add_gpio_func(struct device_node *node, struct pcs_device *pcs) |
1276 | { | 1274 | { |
1277 | const char *propname = "pinctrl-single,gpio-range"; | 1275 | const char *propname = "pinctrl-single,gpio-range"; |
@@ -1637,15 +1635,14 @@ static int pcs_quirk_missing_pinctrl_cells(struct pcs_device *pcs, | |||
1637 | static int pcs_probe(struct platform_device *pdev) | 1635 | static int pcs_probe(struct platform_device *pdev) |
1638 | { | 1636 | { |
1639 | struct device_node *np = pdev->dev.of_node; | 1637 | struct device_node *np = pdev->dev.of_node; |
1640 | const struct of_device_id *match; | ||
1641 | struct pcs_pdata *pdata; | 1638 | struct pcs_pdata *pdata; |
1642 | struct resource *res; | 1639 | struct resource *res; |
1643 | struct pcs_device *pcs; | 1640 | struct pcs_device *pcs; |
1644 | const struct pcs_soc_data *soc; | 1641 | const struct pcs_soc_data *soc; |
1645 | int ret; | 1642 | int ret; |
1646 | 1643 | ||
1647 | match = of_match_device(pcs_of_match, &pdev->dev); | 1644 | soc = of_device_get_match_data(&pdev->dev); |
1648 | if (!match) | 1645 | if (WARN_ON(!soc)) |
1649 | return -EINVAL; | 1646 | return -EINVAL; |
1650 | 1647 | ||
1651 | pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL); | 1648 | pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL); |
@@ -1658,7 +1655,6 @@ static int pcs_probe(struct platform_device *pdev) | |||
1658 | raw_spin_lock_init(&pcs->lock); | 1655 | raw_spin_lock_init(&pcs->lock); |
1659 | mutex_init(&pcs->mutex); | 1656 | mutex_init(&pcs->mutex); |
1660 | INIT_LIST_HEAD(&pcs->gpiofuncs); | 1657 | INIT_LIST_HEAD(&pcs->gpiofuncs); |
1661 | soc = match->data; | ||
1662 | pcs->flags = soc->flags; | 1658 | pcs->flags = soc->flags; |
1663 | memcpy(&pcs->socdata, soc, sizeof(*soc)); | 1659 | memcpy(&pcs->socdata, soc, sizeof(*soc)); |
1664 | 1660 | ||