Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362990
b: refs/heads/master
c: 50cf7c8
h: refs/heads/master
v: v3
  • Loading branch information
Richard Genoud authored and Linus Walleij committed Mar 27, 2013
1 parent d8e63b8 commit e25db30
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3102a76cfbf9ac4ae0cf54c7452f7ba4292a4760
refs/heads/master: 50cf7c8ab324de348990bb028ad9ed10872d527a
20 changes: 19 additions & 1 deletion trunk/drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ static int pinctrl_select_state_locked(struct pinctrl *p,
struct pinctrl_state *state)
{
struct pinctrl_setting *setting, *setting2;
struct pinctrl_state *old_state = p->state;
int ret;

if (p->state == state)
Expand Down Expand Up @@ -973,7 +974,24 @@ static int pinctrl_select_state_locked(struct pinctrl *p,
pinctrl_free_setting(true, setting2);
}
reapply_old_state:
/* FIXME: re-enable old setting */
if (old_state) {
list_for_each_entry(setting, &old_state->settings, node) {
bool found = false;
if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
continue;
list_for_each_entry(setting2, &state->settings, node) {
if (setting2->type != PIN_MAP_TYPE_MUX_GROUP)
continue;
if (setting2->data.mux.group ==
setting->data.mux.group) {
found = true;
break;
}
}
if (!found)
pinmux_enable_setting(setting);
}
}
return ret;
}

Expand Down

0 comments on commit e25db30

Please sign in to comment.