aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinconf.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-19 23:45:46 -0700
committerLinus Walleij <linus.walleij@linaro.org>2012-02-22 17:59:32 +0100
commit2b694250174980382bddcb00e1de7654ecdf6f1f (patch)
tree689d6ef2c9bca17f62c52b5d84bfd998dd2f044c /drivers/pinctrl/pinconf.c
parent03665e0f248d6b7542f72cd7c4ec521109f283c7 (diff)
downloadkernel_goldelico_gta04-2b694250174980382bddcb00e1de7654ecdf6f1f.zip
kernel_goldelico_gta04-2b694250174980382bddcb00e1de7654ecdf6f1f.tar.gz
kernel_goldelico_gta04-2b694250174980382bddcb00e1de7654ecdf6f1f.tar.bz2
pinctrl: Re-order pinconf.[ch] to match each-other
Modify the two files so that the order of function prototypes in the header matches the order of implementations in the .c file. Don't prototype a couple of internal functions. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf.c')
-rw-r--r--drivers/pinctrl/pinconf.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index b74f64a..0c9d08d 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -23,7 +23,20 @@
#include "core.h"
#include "pinconf.h"
-int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
+int pinconf_check_ops(struct pinctrl_dev *pctldev)
+{
+ const struct pinconf_ops *ops = pctldev->desc->confops;
+
+ /* We must be able to read out pin status */
+ if (!ops->pin_config_get && !ops->pin_config_group_get)
+ return -EINVAL;
+ /* We have to be able to config the pins in SOME way */
+ if (!ops->pin_config_set && !ops->pin_config_group_set)
+ return -EINVAL;
+ return 0;
+}
+
+static int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
unsigned long *config)
{
const struct pinconf_ops *ops = pctldev->desc->confops;
@@ -63,7 +76,7 @@ int pin_config_get(const char *dev_name, const char *name,
}
EXPORT_SYMBOL(pin_config_get);
-int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
+static int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
unsigned long config)
{
const struct pinconf_ops *ops = pctldev->desc->confops;
@@ -138,7 +151,6 @@ int pin_config_group_get(const char *dev_name, const char *pin_group,
}
EXPORT_SYMBOL(pin_config_group_get);
-
int pin_config_group_set(const char *dev_name, const char *pin_group,
unsigned long config)
{
@@ -205,19 +217,6 @@ int pin_config_group_set(const char *dev_name, const char *pin_group,
}
EXPORT_SYMBOL(pin_config_group_set);
-int pinconf_check_ops(struct pinctrl_dev *pctldev)
-{
- const struct pinconf_ops *ops = pctldev->desc->confops;
-
- /* We must be able to read out pin status */
- if (!ops->pin_config_get && !ops->pin_config_group_get)
- return -EINVAL;
- /* We have to be able to config the pins in SOME way */
- if (!ops->pin_config_set && !ops->pin_config_group_set)
- return -EINVAL;
- return 0;
-}
-
#ifdef CONFIG_DEBUG_FS
static void pinconf_dump_pin(struct pinctrl_dev *pctldev,