Skip to contentSkip to conversation

IP22: Add platform device for Indy volume buttons

PATCH In review Thomas Bogendoerfer 2 participants 2 messages Jul 11, 2008 – Jul 14, 2008 MIPS

lore
Share & tools
lore

Thomas Bogendoerfer

author maintainer
#0 lore raw

PATCH v2 1/1 IP22: Add platform device for Indy volume buttons

Create platform device for Indy volume buttons and remove button handling from ip22-reset.c

---

Changes in v2:

- Use the -1 as id when creating platform device, because there is only one button device possible

 arch/mips/sgi-ip22/ip22-platform.c |   11 ++++++++
 arch/mips/sgi-ip22/ip22-reset.c    |   51 +----------------------------------
 2 files changed, 13 insertions(+), 49 deletions(-)
arch/mips/sgi-ip22/ip22-platform.c +11 -0
index d93d07a..fc6df96 100644
@@ -182,3 +182,14 @@ static int __init sgi_hal2_devinit(void)
 }
 
 device_initcall(sgi_hal2_devinit);
+
+static int __init sgi_button_devinit(void)
+{
+	if (ip22_is_fullhouse())
+		return 0; /* full house has no volume buttons */
+
+	return IS_ERR(platform_device_register_simple("sgiindybtns",
+						      -1, NULL, 0));
+}
+
+device_initcall(sgi_button_devinit);
arch/mips/sgi-ip22/ip22-reset.c +2 -49

70 lines not on this page · raw message