pinctrl: replace list_*() with get_*_count()
authorViresh Kumar <viresh.kumar@st.com>
Fri, 30 Mar 2012 05:55:40 +0000 (10:55 +0530)
committerPritesh Raithatha <praithatha@nvidia.com>
Thu, 11 Oct 2012 09:05:50 +0000 (14:05 +0530)
commit9ad3722ba187b3452786d4991229fba4661919c4
tree4cd03918cb98e8dc30e0fce3a72713784eeec501
parent016b0ad9d89b7cefce7767320e25da7c34805396
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>
(cherry picked from commit d1e90e9e7467dbfe521b25ba79f520bf676ebc36)

Change-Id: I7a115c0c8dade543e4da3a867933a3650b0c5ef9
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
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