summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-19 23:45:42 -0700
committerLinus Walleij <linus.walleij@linaro.org>2012-02-22 17:59:31 +0100
commit8b9c139f166cd55d76728a5910fa862a4e16e833 (patch)
tree7c2090cea5e0961d8a710f36eb2b3fb5f032459c /drivers/pinctrl/core.c
parent13398a4b90c87f0250928f01b5735a157fcc0847 (diff)
pinctrl: use list_add_tail instead of list_add
This mostly makes debugfs files print things in the order that they were added or acquired, which just feels a little more consistent. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r--drivers/pinctrl/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 84a24a693e0..feadf1c3113 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -309,7 +309,7 @@ void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range)
{
mutex_lock(&pctldev->gpio_ranges_lock);
- list_add(&range->node, &pctldev->gpio_ranges);
+ list_add_tail(&range->node, &pctldev->gpio_ranges);
mutex_unlock(&pctldev->gpio_ranges_lock);
}
@@ -569,7 +569,7 @@ struct pinctrl *pinctrl_get(struct device *dev, const char *name)
/* Add the pinmux to the global list */
mutex_lock(&pinctrl_list_mutex);
- list_add(&p->node, &pinctrl_list);
+ list_add_tail(&p->node, &pinctrl_list);
mutex_unlock(&pinctrl_list_mutex);
return p;
@@ -749,7 +749,7 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev,
dev_info(pctldev->dev, "hogged map %s, function %s\n", map->name,
map->function);
mutex_lock(&pctldev->pinctrl_hogs_lock);
- list_add(&hog->node, &pctldev->pinctrl_hogs);
+ list_add_tail(&hog->node, &pctldev->pinctrl_hogs);
mutex_unlock(&pctldev->pinctrl_hogs_lock);
return 0;
@@ -1197,7 +1197,7 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
pinctrl_init_device_debugfs(pctldev);
mutex_lock(&pinctrldev_list_mutex);
- list_add(&pctldev->node, &pinctrldev_list);
+ list_add_tail(&pctldev->node, &pinctrldev_list);
mutex_unlock(&pinctrldev_list_mutex);
pinctrl_hog_maps(pctldev);
return pctldev;