]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
leds-gpio: Remove stray assignment to brightness_set
authorPhil Elwell <phil@raspberrypi.org>
Tue, 28 Mar 2017 16:41:30 +0000 (17:41 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 19 Sep 2017 10:07:57 +0000 (12:07 +0200)
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 <phil@raspberrypi.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/leds/leds-gpio.c

index 6a27a693034825de2897bb7b338b60cc10c9e59f..a6b352cb003ff5e6c87cf6d37d6502b6b7c63e89 100644 (file)
@@ -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);