From: Phil Elwell Date: Tue, 28 Mar 2017 16:41:30 +0000 (+0100) Subject: leds-gpio: Remove stray assignment to brightness_set X-Git-Tag: archive/raspbian/4.9.82-1+deb9u3+rpi1_jessie~5^2~265 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=28e8a1d54515d1b4f9e44f1a8dbb486b0a714af9;p=linux-4.9.git leds-gpio: Remove stray assignment to brightness_set The brightness_set method is intended for use cases that must not block, and can only be used if the GPIO provider can never sleep. Remove an accidental initialisation (a copy-and-paste error) that sets it regardless, which has been seen to cause crashes with the gpio expander driver. Signed-off-by: Phil Elwell --- diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 6a27a6930348..a6b352cb003f 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -136,7 +136,6 @@ static int create_gpio_led(const struct gpio_led *template, led_dat->platform_gpio_blink_set = blink_set; led_dat->cdev.blink_set = gpio_blink_set; } - led_dat->cdev.brightness_set = gpio_led_set; led_dat->cdev.brightness_get = gpio_led_get; if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) { state = gpiod_get_value_cansleep(led_dat->gpiod);