summaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip32/ip32-platform.c
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2008-07-05 01:12:13 +0200
committerRalf Baechle <ralf@linux-mips.org>2008-07-15 19:44:32 +0200
commit8fa9cc16f820915fbe8ab6047c420703a87c307e (patch)
tree2d90fe6408118e8a9716d497d4e5ce952a9f654b /arch/mips/sgi-ip32/ip32-platform.c
parent[MIPS] IP28: switch to "normal" mode after PROM no longer needed (diff)
downloadlinux-8fa9cc16f820915fbe8ab6047c420703a87c307e.tar.xz
linux-8fa9cc16f820915fbe8ab6047c420703a87c307e.zip
[MIPS] IP32: Add platform devices for audio and volume button
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>
Diffstat (limited to 'arch/mips/sgi-ip32/ip32-platform.c')
-rw-r--r--arch/mips/sgi-ip32/ip32-platform.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index 89a71f49b692..2ee401ba0b25 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -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");