pinctrl: Remove duplicate code in pinctrl_pm_select_state functions
authorTony Lindgren <tony@atomide.com>
Thu, 18 Jul 2013 15:15:04 +0000 (08:15 -0700)
committer黄涛 <huangtao@rock-chips.com>
Fri, 3 Jan 2014 10:56:01 +0000 (18:56 +0800)
commit7eed91bf696b1056da0e7ba37a1292a7e7febb45
treeab9223c078f8a2daf17e9ca6e4e09d4e0ae9dc70
parent3e91bba6a9d6cf35edddfeaedd3640f9267ebfa4
pinctrl: Remove duplicate code in pinctrl_pm_select_state functions

There's no need to duplicate essentially the same functions. Let's
introduce static int pinctrl_pm_select_state() and make the other
related functions call that.

This allows us to add support later on for multiple active states,
and more optimized dynamic remuxing.

Note that we still need to export the various pinctrl_pm_select
functions as we want to keep struct pinctrl_state private to the
pinctrl code, and cannot replace those with inline functions.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c