Re: [PATCH v4 1/3] leds: Introduce userspace leds driver

From: David Lechner
Date: Tue Nov 08 2016 - 14:08:36 EST




On 11/8/16 5:26 AM, Jacek Anaszewski wrote:
Hi David,


+struct uleds_device {
+ struct uleds_user_dev user_dev;
+ struct led_classdev led_cdev;
+ struct mutex mutex;
+ enum uleds_state state;
+ wait_queue_head_t waitq;
+ unsigned char brightness;

I've just noticed that this is wrong, since LED subsystem
brightness type is enum led_brightness, i.e. int.
LED_FULL (255) value is a legacy enum value that can be overridden
by max_brightness property.

Please submit a fix so that I could merge it with the original
patch before sending it upstream.

Thanks,
Jacek Anaszewski


The brightness should be a 32-bit integer then?