Re: LEDS: S3C24XX generate name if none given

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-01-15 at 12:26 +0000, Ben Dooks wrote:
> Generate a name if none is passed to the S3C24XX GPIO LED driver.
> 
> Signed-off-by: Ben Dooks <[email protected]>
> 
> diff -urpN -X ../dontdiff linux-2.6.19/drivers/leds/leds-s3c24xx.c linux-2.6.19-simtec1p22/drivers/leds/leds-s3c24xx.c
> --- linux-2.6.19/drivers/leds/leds-s3c24xx.c	2006-11-29 21:57:37.000000000 +0000
> +++ linux-2.6.19-simtec1p22/drivers/leds/leds-s3c24xx.c	2007-01-04 10:22:58.000000000 +0000
> @@ -23,6 +23,8 @@
>  /* our context */
>  
>  struct s3c24xx_gpio_led {
> +	char				 name[32];
> +
>  	struct led_classdev		 cdev;

I'm not that keen on this since it wastes 32 bytes per LED when the
platform code does declare the names. If you're happy with that, its up
to you as the platform maintainer I guess but is there no nicer way to
handle this? I'm mainly concerned about people copying this code into
other drivers as then they'll all end up doing it...

Richard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux