linux-mips
[Top] [All Lists]

Re: [PATCH -mm][MIPS] GPIO LED driver for the WGT634U machine

To: Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH -mm][MIPS] GPIO LED driver for the WGT634U machine
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed, 15 Aug 2007 17:39:31 +0200 (CEST)
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mips@linux-mips.org
In-reply-to: <20070815112507.GB17615@hall.aurel32.net>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070815112507.GB17615@hall.aurel32.net>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 15 Aug 2007, Aurelien Jarno wrote:
> --- a/arch/mips/bcm947xx/wgt634u.c
> +++ b/arch/mips/bcm947xx/wgt634u.c

> +static const struct gpio_led wgt634u_leds[] = {

> +static const struct gpio_led_platform_data wgt634u_led_data = {
> +     .num_leds =     ARRAY_SIZE(wgt634u_leds),
> +     .leds =         (void *) wgt634u_leds,
                        ^^^^^^^^

gpio_led_platform_data.leds is of type struct gpio_led *.
Should it be const, or should the const be dropped from wgt634u_leds?

> +static struct platform_device wgt634u_gpio_leds = {
> +     .name =         "leds-gpio",
> +     .id =           -1,
> +     .dev = {
> +             .platform_data = (void *) &wgt634u_led_data,
                                 ^^^^^^^^
device.platform_data is a void *, so you can drop the cast.

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>