Skip to content

Commit

Permalink
pinctrl: use list_add_tail instead of list_add
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
nvswarren authored and linusw committed Feb 22, 2012
1 parent 13398a4 commit 8b9c139
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev,
kfree(grp);
return ret;
}
list_add(&grp->node, &p->groups);
list_add_tail(&grp->node, &p->groups);

return 0;
}
Expand Down

0 comments on commit 8b9c139

Please sign in to comment.