summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/led_bl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-03 11:31:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-03 11:31:01 -0700
commit0a8d6c9c7128a93689fba384cdd7f72b0ce19abd (patch)
treec8c1ecd4304a9d51b07a87353cd83b0eaf12f721 /drivers/video/backlight/led_bl.c
parentc156d4af4354091c38a1cbef62c0b1574e8c4394 (diff)
parenta33677b9211b6c328ad359b072043af94f7c9592 (diff)
downloadlwn-0a8d6c9c7128a93689fba384cdd7f72b0ce19abd.tar.gz
lwn-0a8d6c9c7128a93689fba384cdd7f72b0ce19abd.zip
Merge tag 'backlight-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones: "New Functionality: - Add lots of Device Tree bindings / support - Turn off LED strings when display is blank - Switch I2C drivers from .probe_new() to .probe() - Remove superfluous NULL checks - Only obtain PWM information once and do it in .probe() Fix-ups: - Ensure locks are obtained and held when required" * tag 'backlight-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: led_bl: Take led_access lock when required video: backlight: lp855x: Get PWM for PWM mode during probe dt-bindings: backlight: lp855x: Convert to YAML and modernize dt-bindings: backlight: pwm: Make power-supply not required backlight: pwm_bl: Remove unneeded checks for valid GPIOs backlight: Switch i2c drivers back to use .probe() backlight: lm3630a: Turn off both led strings when display is blank dt-bindings: leds: backlight: ktz8866: Add reg property and update example
Diffstat (limited to 'drivers/video/backlight/led_bl.c')
-rw-r--r--drivers/video/backlight/led_bl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index a1b6a2ad73a0..3259292fda76 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -209,8 +209,11 @@ static int led_bl_probe(struct platform_device *pdev)
return PTR_ERR(priv->bl_dev);
}
- for (i = 0; i < priv->nb_leds; i++)
+ for (i = 0; i < priv->nb_leds; i++) {
+ mutex_lock(&priv->leds[i]->led_access);
led_sysfs_disable(priv->leds[i]);
+ mutex_unlock(&priv->leds[i]->led_access);
+ }
backlight_update_status(priv->bl_dev);