]> git.baikalelectronics.ru Git - kernel.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, 18 Apr 2012 11:53:10 +0000 (13:53 +0200)
commit6bd0495c09029e59be26a03e2c1d16d1c50a4bc9
tree2c4a2b8bfa2a984cb57a781b034a204a12fcc4b6
parentac802667a45150894a592a588afef0a17c4c8ea8
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