]> 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>
Tue, 3 Apr 2012 21:02:19 +0000 (23:02 +0200)
commit8cfa831995df9b57fc80138f9ff816c2a76daa76
treee44e2075f59a0e3c8ffbd9173c27dec5e214a7f9
parentcb2637a0ce24b0265b2df724ba8a92874d10cbc0
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