]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pinctrl: replace list_*() with get_*_count()
authorViresh Kumar <viresh.kumar@st.com>
Fri, 30 Mar 2012 05:55:40 +0000 (11:25 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Apr 2012 08:28:37 +0000 (10:28 +0200)
commit0399655e830e628135b29b3fad0d16dc23546888
tree5a973af1070b614b0aa3a80afda7025191b63004
parent66df9385b8b9562d14831cf3098e237dc2cea8b4
pinctrl: replace list_*() with get_*_count()

Most of the SoC drivers implement list_groups() and list_functions()
routines for pinctrl and pinmux. These routines continue returning
zero until the selector argument is greater than total count of
available groups or functions.

This patch replaces these list_*() routines with get_*_count()
routines, which returns the number of available selection for SoC
driver. pinctrl layer will use this value to check the range it can
choose.

This patch fixes all user drivers for this change. There are other
routines in user drivers, which have checks to check validity of
selector passed to them. It is also no more required and hence
removed.

Documentation updated as well.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
[Folded in fix and fixed a minor merge artifact manually]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/pinctrl.txt
drivers/pinctrl/core.c
drivers/pinctrl/pinconf.c
drivers/pinctrl/pinctrl-pxa3xx.c
drivers/pinctrl/pinctrl-sirf.c
drivers/pinctrl/pinctrl-tegra.c
drivers/pinctrl/pinctrl-u300.c
drivers/pinctrl/pinmux.c
include/linux/pinctrl/pinctrl.h
include/linux/pinctrl/pinmux.h