aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/core.c19
-rw-r--r--drivers/pinctrl/pinctrl-tegra.c1
-rw-r--r--drivers/pinctrl/pinctrl-u300.c2
-rw-r--r--include/linux/pinctrl/pinctrl.h2
4 files changed, 5 insertions, 19 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 50d9c289cffd..902428dfb37e 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -333,20 +333,6 @@ void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
333EXPORT_SYMBOL_GPL(pinctrl_add_gpio_range); 333EXPORT_SYMBOL_GPL(pinctrl_add_gpio_range);
334 334
335/** 335/**
336 * pinctrl_remove_gpio_range() - remove a range of GPIOs fro a pin controller
337 * @pctldev: pin controller device to remove the range from
338 * @range: the GPIO range to remove
339 */
340void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
341 struct pinctrl_gpio_range *range)
342{
343 mutex_lock(&pinctrl_mutex);
344 list_del(&range->node);
345 mutex_unlock(&pinctrl_mutex);
346}
347EXPORT_SYMBOL_GPL(pinctrl_remove_gpio_range);
348
349/**
350 * pinctrl_get_group_selector() - returns the group selector for a group 336 * pinctrl_get_group_selector() - returns the group selector for a group
351 * @pctldev: the pin controller handling the group 337 * @pctldev: the pin controller handling the group
352 * @pin_group: the pin group to look up 338 * @pin_group: the pin group to look up
@@ -1480,6 +1466,7 @@ EXPORT_SYMBOL_GPL(pinctrl_register);
1480 */ 1466 */
1481void pinctrl_unregister(struct pinctrl_dev *pctldev) 1467void pinctrl_unregister(struct pinctrl_dev *pctldev)
1482{ 1468{
1469 struct pinctrl_gpio_range *range, *n;
1483 if (pctldev == NULL) 1470 if (pctldev == NULL)
1484 return; 1471 return;
1485 1472
@@ -1495,6 +1482,10 @@ void pinctrl_unregister(struct pinctrl_dev *pctldev)
1495 /* Destroy descriptor tree */ 1482 /* Destroy descriptor tree */
1496 pinctrl_free_pindescs(pctldev, pctldev->desc->pins, 1483 pinctrl_free_pindescs(pctldev, pctldev->desc->pins,
1497 pctldev->desc->npins); 1484 pctldev->desc->npins);
1485 /* remove gpio ranges map */
1486 list_for_each_entry_safe(range, n, &pctldev->gpio_ranges, node)
1487 list_del(&range->node);
1488
1498 kfree(pctldev); 1489 kfree(pctldev);
1499 1490
1500 mutex_unlock(&pinctrl_mutex); 1491 mutex_unlock(&pinctrl_mutex);
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index b6934867d8d3..07228b17a370 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -764,7 +764,6 @@ int __devexit tegra_pinctrl_remove(struct platform_device *pdev)
764{ 764{
765 struct tegra_pmx *pmx = platform_get_drvdata(pdev); 765 struct tegra_pmx *pmx = platform_get_drvdata(pdev);
766 766
767 pinctrl_remove_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);
768 pinctrl_unregister(pmx->pctl); 767 pinctrl_unregister(pmx->pctl);
769 768
770 return 0; 769 return 0;
diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c
index 6cd697a079f9..5f43f9ae36d3 100644
--- a/drivers/pinctrl/pinctrl-u300.c
+++ b/drivers/pinctrl/pinctrl-u300.c
@@ -1175,8 +1175,6 @@ static int __devexit u300_pmx_remove(struct platform_device *pdev)
1175 struct u300_pmx *upmx = platform_get_drvdata(pdev); 1175 struct u300_pmx *upmx = platform_get_drvdata(pdev);
1176 int i; 1176 int i;
1177 1177
1178 for (i = 0; i < ARRAY_SIZE(u300_gpio_ranges); i++)
1179 pinctrl_remove_gpio_range(upmx->pctl, &u300_gpio_ranges[i]);
1180 pinctrl_unregister(upmx->pctl); 1178 pinctrl_unregister(upmx->pctl);
1181 iounmap(upmx->virtbase); 1179 iounmap(upmx->virtbase);
1182 release_mem_region(upmx->phybase, upmx->physize); 1180 release_mem_region(upmx->phybase, upmx->physize);
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 3b894a668d32..170a588a55b6 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -131,8 +131,6 @@ extern void pinctrl_unregister(struct pinctrl_dev *pctldev);
131extern bool pin_is_valid(struct pinctrl_dev *pctldev, int pin); 131extern bool pin_is_valid(struct pinctrl_dev *pctldev, int pin);
132extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev, 132extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
133 struct pinctrl_gpio_range *range); 133 struct pinctrl_gpio_range *range);
134extern void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
135 struct pinctrl_gpio_range *range);
136extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev); 134extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
137extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev); 135extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);
138#else 136#else