linux-mips
[Top] [All Lists]

Re: [PATCH] IP22: Add platform device for Indy volume buttons

To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [PATCH] IP22: Add platform device for Indy volume buttons
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Fri, 11 Jul 2008 21:09:31 +0200 (CEST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20080711183432.1CEEDC2EB7@solo.franken.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080711183432.1CEEDC2EB7@solo.franken.de>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 11 Jul 2008, Thomas Bogendoerfer wrote:
> --- a/arch/mips/sgi-ip22/ip22-platform.c
> +++ b/arch/mips/sgi-ip22/ip22-platform.c
> @@ -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));
                                                      ^
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 -- geert@linux-m68k.org

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

<Prev in Thread] Current Thread [Next in Thread>