Commit ef959b38 authored by Phil Elwell's avatar Phil Elwell
Browse files

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: default avatarPhil Elwell <phil@raspberrypi.org>
parent 7b6735fb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);