ARM: shmobile: sh7372: Register PFC platform device
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 15 Dec 2012 22:50:59 +0000 (23:50 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 25 Jan 2013 00:24:23 +0000 (09:24 +0900)
Add arch code to register the PFC platform device instead of calling the
driver directly. Platform device registration in the sh-pfc driver will
be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/pfc-sh7372.c

index 7a1525fd6adaccd84c0d384ba8d586a2fbe606fa..dd5e145eeb07d922d0085b875ab9554740cfc9e7 100644 (file)
@@ -22,6 +22,7 @@
  */
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
 #include <linux/sh_pfc.h>
 #include <mach/irqs.h>
 #include <mach/sh7372.h>
@@ -1657,7 +1658,15 @@ static struct pinmux_info sh7372_pinmux_info = {
        .gpio_irq_size = ARRAY_SIZE(pinmux_irqs),
 };
 
+static struct platform_device sh7372_pfc_device = {
+       .name           = "sh-pfc",
+       .id             = -1,
+       .dev = {
+               .platform_data = &sh7372_pinmux_info,
+       },
+};
+
 void sh7372_pinmux_init(void)
 {
-       register_pinmux(&sh7372_pinmux_info);
+       platform_device_register(&sh7372_pfc_device);
 }