sh-pfc: Merge PFC core and pinctrl
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 15 Dec 2012 22:50:45 +0000 (23:50 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 25 Jan 2013 00:24:21 +0000 (09:24 +0900)
The PFC core is only used by the pinctrl and gpio modules. As the gpio
module depends on the pinctrl module, the pinctrl module will always be
present if the core gets used. There is thus no point in keeping core
and pinctrl in two seperate modules. Merge them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/sh/pfc/Kconfig
drivers/sh/pfc/Makefile
drivers/sh/pfc/core.c
drivers/sh/pfc/pinctrl.c

index 804f9ad1bf4a9a219397ced127572b389ec05999..f33d82a38b4bd9dedef2b22a1df65d9b232a11c6 100644 (file)
@@ -5,18 +5,10 @@ config SH_PFC
        depends on GENERIC_GPIO
        select GPIO_SH_PFC if ARCH_REQUIRE_GPIOLIB
        select PINCTRL_SH_PFC
-       def_bool y
-
-#
-# Placeholder for now, rehome to drivers/pinctrl once the PFC APIs
-# have settled.
-#
-config PINCTRL_SH_PFC
-       tristate "SuperH PFC pin controller driver"
-       depends on SH_PFC
        select PINCTRL
        select PINMUX
        select PINCONF
+       def_bool y
 
 config GPIO_SH_PFC
        tristate "SuperH PFC GPIO support"
index 7916027cce37649ad661628b64d806c65e7002ac..ce6fae353844c625f9b11b4170f2bcd41b279223 100644 (file)
@@ -1,3 +1,3 @@
-obj-y                          += core.o
-obj-$(CONFIG_PINCTRL_SH_PFC)   += pinctrl.o
+sh-pfc-objs                    = core.o pinctrl.o
+obj-y                          += sh-pfc.o
 obj-$(CONFIG_GPIO_SH_PFC)      += gpio.o
index 72421a4a883d06420e17ffff215a33feec106bfc..30e33db7a2dc3c389a44eb7fff8397b4b78dfc9e 100644 (file)
@@ -8,7 +8,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  */
-#define pr_fmt(fmt) "sh_pfc " KBUILD_MODNAME ": " fmt
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -497,7 +497,6 @@ int sh_pfc_config_gpio(struct sh_pfc *pfc, unsigned gpio, int pinmux_type,
  out_err:
        return -1;
 }
-EXPORT_SYMBOL_GPL(sh_pfc_config_gpio);
 
 int register_sh_pfc(struct sh_pfc_platform_data *pdata)
 {
@@ -528,17 +527,9 @@ int register_sh_pfc(struct sh_pfc_platform_data *pdata)
        /*
         * Initialize pinctrl bindings first
         */
-       initroutine = symbol_request(sh_pfc_register_pinctrl);
-       if (initroutine) {
-               ret = (*initroutine)(&sh_pfc);
-               symbol_put_addr(initroutine);
-
-               if (unlikely(ret != 0))
-                       goto err;
-       } else {
-               pr_err("failed to initialize pinctrl bindings\n");
+       ret = sh_pfc_register_pinctrl(&sh_pfc);
+       if (unlikely(ret != 0))
                goto err;
-       }
 
        /*
         * Then the GPIO chip
index 5801a56861489a61622ba2502d6ecb5e5136156e..6f0f58bd3f87e080d586e89dc3ca014ae56b9d98 100644 (file)
@@ -9,7 +9,7 @@
  */
 #define DRV_NAME "pinctrl-sh_pfc"
 
-#define pr_fmt(fmt) DRV_NAME " " KBUILD_MODNAME ": " fmt
+#define pr_fmt(fmt) KBUILD_MODNAME " pinctrl: " fmt
 
 #include <linux/init.h>
 #include <linux/module.h>
@@ -521,7 +521,6 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
 
        return sh_pfc_pinctrl_init();
 }
-EXPORT_SYMBOL_GPL(sh_pfc_register_pinctrl);
 
 static void __exit sh_pfc_pinctrl_exit(void)
 {
This page took 0.026406 seconds and 5 git commands to generate.