Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (812 commits) Linux 4.4.167 mac80211: ignore NullFunc frames in the duplicate detection mac80211: fix reordering of buffered broadcast packets mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext mac80211: Clear beacon_int in ieee80211_do_stop mac80211_hwsim: Timer should be initialized before device registered kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var() tty: serial: 8250_mtk: always resume the device in probe. cifs: Fix separator when building path from dentry Staging: lustre: remove two build warnings xhci: Prevent U1/U2 link pm states if exit latency is too long SUNRPC: Fix leak of krb5p encode pages virtio/s390: fix race in ccw_io_helper() virtio/s390: avoid race on vcdev->config ALSA: pcm: Fix interval evaluation with openmin/max ALSA: pcm: Call snd_pcm_unlink() conditionally at closing ALSA: pcm: Fix starvation on down_write_nonblock() ALSA: hda: Add support for AMD Stoney Ridge ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c USB: check usb_get_extra_descriptor for proper size ... Conflicts: drivers/gpu/drm/rockchip/rockchip_drm_drv.c drivers/usb/host/xhci-ring.c Change-Id: I4304b0875908403a7d88a0d77da52cea04563c11
This commit is contained in:
@ -247,12 +247,13 @@ void led_classdev_unregister(struct led_classdev *led_cdev)
|
||||
up_write(&led_cdev->trigger_lock);
|
||||
#endif
|
||||
|
||||
cancel_work_sync(&led_cdev->set_brightness_work);
|
||||
|
||||
/* Stop blinking */
|
||||
led_stop_software_blink(led_cdev);
|
||||
|
||||
led_set_brightness(led_cdev, LED_OFF);
|
||||
|
||||
flush_work(&led_cdev->set_brightness_work);
|
||||
|
||||
device_unregister(led_cdev->dev);
|
||||
|
||||
down_write(&leds_list_lock);
|
||||
|
||||
@ -118,8 +118,8 @@ static int create_gpio_led(const struct gpio_led *template,
|
||||
return ret;
|
||||
|
||||
led_dat->gpiod = gpio_to_desc(template->gpio);
|
||||
if (IS_ERR(led_dat->gpiod))
|
||||
return PTR_ERR(led_dat->gpiod);
|
||||
if (!led_dat->gpiod)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
led_dat->cdev.name = template->name;
|
||||
|
||||
@ -141,6 +141,7 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
|
||||
ret = led_classdev_register(dev, &led_data->cdev);
|
||||
if (ret == 0) {
|
||||
priv->num_leds++;
|
||||
led_pwm_set(&led_data->cdev, led_data->cdev.brightness);
|
||||
} else {
|
||||
dev_err(dev, "failed to register PWM led for %s: %d\n",
|
||||
led->name, ret);
|
||||
|
||||
Reference in New Issue
Block a user