IP22: Add platform device for Indy volume buttons
Thomas Bogendoerfer
maintainerPATCH 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
---
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
@@ -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" , +0 ,NULL ,0 )); +} + +device_initcall (sgi_button_devinit);
arch/mips/sgi-ip22/ip22-reset.c +2 -49
70 lines not on this page · raw message
Quoted 4 lines · Thomas Bogendoerfer
arch/mips/sgi-ip22/ip22-platform.c +0
-0@@ -182,3 +182,14 @@ static int __init sgi_hal2_devinit(void) }
arch/mips/sgi-ip22/ip22-platform.c static int __init sgi_hal2_devinit(void) · line 192
Quoted 10 lines
arch/mips/sgi-ip22/ip22-platform.c +8
-0device_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" , +0 ,NULL ,0 ));
^
Shouldn't the instance id be -1, as there can be only one? (cfr. Documentation/driver-model/platform.txt)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Thomas Bogendoerfer
maintainerQuoted 16 lines · Geert Uytterhoeven
Quoted 4 lines · Thomas Bogendoerfer
arch/mips/sgi-ip22/ip22-platform.c +0
-0@@ -182,3 +182,14 @@ static int __init sgi_hal2_devinit(void) }arch/mips/sgi-ip22/ip22-platform.c static int __init sgi_hal2_devinit(void) · line 192
Quoted 10 lines
arch/mips/sgi-ip22/ip22-platform.c +8
-0device_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" , +0 ,NULL ,0 ));^
Quoted 2 lines
Shouldn't the instance id be -1, as there can be only one? (cfr.
Documentation/driver-model/platform.txt)
thanks. I'll send an updated patch asap.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ]