linux-mips
[Top] [All Lists]

Re: [SPAM] [PATCH] IP32: Add platform devices for audio and volume butto

To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [SPAM] [PATCH] IP32: Add platform devices for audio and volume button
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Sat, 5 Jul 2008 10:22:30 +0200 (CEST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20080704231213.3C6121DA77A@solo.franken.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080704231213.3C6121DA77A@solo.franken.de>
Sender: linux-mips-bounce@linux-mips.org
On Sat, 5 Jul 2008, Thomas Bogendoerfer wrote:
> +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);

This sequence is exactly what platform_device_register_simple() does, right?

BTW, I'm also still wondering what's the most efficient way of creating
platform devices. There's also platform_device_register()...

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>