]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] IP32: Add platform devices for audio and volume button
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 4 Jul 2008 23:12:13 +0000 (01:12 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 15 Jul 2008 17:44:32 +0000 (18:44 +0100)
Create platform devices for audio and volume button driver.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/sgi-ip32/ip32-platform.c

index 89a71f49b692a31450911cc2be04f378c71f079d..2ee401ba0b2568edb7bb1c503df5eb880c8589d3 100644 (file)
@@ -65,6 +65,42 @@ static __init int meth_devinit(void)
 
 device_initcall(meth_devinit);
 
+static __init int sgio2audio_devinit(void)
+{
+       struct platform_device *pd;
+       int ret;
+
+       pd = platform_device_alloc("sgio2audio", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+
+device_initcall(sgio2audio_devinit);
+
+static __init int sgio2btns_devinit(void)
+{
+       struct platform_device *pd;
+       int ret;
+
+       pd = platform_device_alloc("sgio2btns", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+
+device_initcall(sgio2btns_devinit);
+
 MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("8250 UART probe driver for SGI IP32 aka O2");