On Wed, 18 Jan 2012, Dmitry Torokhov wrote: > Input: q40kbd - convert driver to the split model > > From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> > > Convert the driver to standard spilt model arch-specific code registers > platform device to which driver code can bind later. > > Also request IRQ immediately upon binding to the device instead of doing > this when serio port is being opened. > > Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx> > --- > > arch/m68k/q40/config.c | 7 ++ > drivers/input/serio/q40kbd.c | 139 ++++++++++++++++++++++++------------------ > 2 files changed, 86 insertions(+), 60 deletions(-) > > > diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c > index ad10fec..c72a3ed 100644 > --- a/arch/m68k/q40/config.c > +++ b/arch/m68k/q40/config.c > @@ -24,6 +24,7 @@ > #include <linux/rtc.h> > #include <linux/vt_kern.h> > #include <linux/bcd.h> > +#include <linux/platform_device.h> > > #include <asm/io.h> > #include <asm/rtc.h> > @@ -329,3 +330,9 @@ static int q40_set_rtc_pll(struct rtc_pll_info *pll) > } else > return -EINVAL; > } > + > +static __init int q40_add_kbd_device(void) > +{ > + return platform_device_register_simple("q40kbd", -1, NULL, 0); arch/m68k/q40/config.c: In function ʽq40_add_kbd_deviceʼ: arch/m68k/q40/config.c:336: warning: return makes integer from pointer without a cast Either ignore the error and always return 0, or: diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index c72a3ed..be93648 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c @@ -333,6 +333,12 @@ static int q40_set_rtc_pll(struct rtc_pll_info *pll) static __init int q40_add_kbd_device(void) { - return platform_device_register_simple("q40kbd", -1, NULL, 0); + struct platform_device *pdev; + + pdev = platform_device_register_simple("q40kbd", -1, NULL, 0); + if (IS_ERR(pdev)) + return PTR_ERR(pdev); + + return 0; } arch_initcall(q40_add_kbd_device); The rest is Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx 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 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html