summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-02-10 01:34:12 +0100
committerLinus Walleij <linus.walleij@linaro.org>2012-02-10 21:33:10 +0100
commit77a5988355f993840928d195f790a939200a4ff0 (patch)
treeb2590450fb4c5e956ddfc119e6bb610ce53aa8a9 /drivers/pinctrl/core.c
parentbefe5bdfbb698b3bc57c58d0bd7ca3391c9275ed (diff)
pinctrl: changes hog mechanism to be self-referential
Instead of a specific boolean field to indicate if a map entry shall be hogged, treat self-reference as an indication of desired hogging. This drops one field off the map struct and has a nice Douglas R. Hofstadter-feel to it. Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ec32c545f07f..c5f76ad5a8c5 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -793,11 +793,9 @@ int pinctrl_hog_maps(struct pinctrl_dev *pctldev)
for (i = 0; i < pinctrl_maps_num; i++) {
struct pinctrl_map const *map = &pinctrl_maps[i];
- if (!map->hog_on_boot)
- continue;
-
if (map->ctrl_dev_name &&
- !strcmp(map->ctrl_dev_name, devname)) {
+ !strcmp(map->ctrl_dev_name, devname) &&
+ !strcmp(map->dev_name, devname)) {
/* OK time to hog! */
ret = pinctrl_hog_map(pctldev, map);
if (ret)