linux/drivers/video/backlight
Mans Rullgard a33677b921 backlight: led_bl: Take led_access lock when required
The led_access lock must be held when calling led_sysfs_enable() and
led_sysfs_disable().  This fixes warnings such as this:

[    2.432495] ------------[ cut here ]------------
[    2.437316] WARNING: CPU: 0 PID: 22 at drivers/leds/led-core.c:349 led_sysfs_disable+0x54/0x58
[    2.446105] Modules linked in:
[    2.449218] CPU: 0 PID: 22 Comm: kworker/u2:1 Not tainted 6.3.8+ #1
[    2.456268] Hardware name: Generic AM3517 (Flattened Device Tree)
[    2.462402] Workqueue: events_unbound deferred_probe_work_func
[    2.468353]  unwind_backtrace from show_stack+0x10/0x14
[    2.473632]  show_stack from dump_stack_lvl+0x24/0x2c
[    2.478759]  dump_stack_lvl from __warn+0x9c/0xc4
[    2.483551]  __warn from warn_slowpath_fmt+0x64/0xc0
[    2.488586]  warn_slowpath_fmt from led_sysfs_disable+0x54/0x58
[    2.494567]  led_sysfs_disable from led_bl_probe+0x20c/0x3b0
[    2.500305]  led_bl_probe from platform_probe+0x5c/0xb8
[    2.505615]  platform_probe from really_probe+0xc8/0x2a0
[    2.510986]  really_probe from __driver_probe_device+0x88/0x19c
[    2.516967]  __driver_probe_device from driver_probe_device+0x30/0xcc
[    2.523498]  driver_probe_device from __device_attach_driver+0x94/0xc4
[    2.530090]  __device_attach_driver from bus_for_each_drv+0x80/0xcc
[    2.536437]  bus_for_each_drv from __device_attach+0xf8/0x19c
[    2.542236]  __device_attach from bus_probe_device+0x8c/0x90
[    2.547973]  bus_probe_device from deferred_probe_work_func+0x80/0xb0
[    2.554504]  deferred_probe_work_func from process_one_work+0x228/0x4c0
[    2.561187]  process_one_work from worker_thread+0x1fc/0x4d0
[    2.566925]  worker_thread from kthread+0xb4/0xd0
[    2.571685]  kthread from ret_from_fork+0x14/0x2c
[    2.576446] Exception stack(0xd0079fb0 to 0xd0079ff8)
[    2.581573] 9fa0:                                     00000000 00000000 00000000 00000000
[    2.589813] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.598052] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    2.604888] ---[ end trace 0000000000000000 ]---

Signed-off-by: Mans Rullgard <mans@mansr.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20230619160249.10414-1-mans@mansr.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-26 16:29:42 +01:00
..
88pm860x_bl.c
aat2870_bl.c backlight: aat2870_bl: Convert to platform remove callback returning void 2023-03-16 15:08:35 +00:00
adp5520_bl.c backlight: adp5520_bl: Convert to platform remove callback returning void 2023-03-16 15:08:35 +00:00
adp8860_bl.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
adp8870_bl.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
ams369fg06.c
apple_bl.c backlight: apple_bl: Use acpi_video_get_backlight_type() 2023-03-16 13:33:11 +01:00
arcxcnn_bl.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
as3711_bl.c backlight: as3711: Use of_property_read_bool() for boolean properties 2023-03-16 16:12:53 +00:00
backlight.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
bd6107.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
corgi_lcd.c
cr_bllcd.c backlight: cr_bllcd: Convert to platform remove callback returning void 2023-03-16 15:08:35 +00:00
da903x_bl.c
da9052_bl.c backlight: da9052_bl: Convert to platform remove callback returning void 2023-03-16 15:08:35 +00:00
ep93xx_bl.c
gpio_backlight.c
hp680_bl.c backlight: hp680_bl: Convert to platform remove callback returning void 2023-03-16 15:08:35 +00:00
hx8357.c backlight: hx8357: Use of_property_present() for testing DT property presence 2023-03-16 16:12:27 +00:00
ili922x.c
ili9320.c
ili9320.h
ipaq_micro_bl.c backlight: ipaq_micro: Use backlight helper 2023-02-22 10:55:27 +00:00
jornada720_bl.c
jornada720_lcd.c
kb3886_bl.c
Kconfig backlight: apple_bl: Use acpi_video_get_backlight_type() 2023-03-16 13:33:11 +01:00
ktd253-backlight.c backlight: ktd253: Switch to use dev_err_probe() helper 2023-02-22 10:54:59 +00:00
ktz8866.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
l4f00242t03.c
lcd.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
led_bl.c backlight: led_bl: Take led_access lock when required 2023-06-26 16:29:42 +01:00
lm3533_bl.c backlight: lm3533_bl: Convert to platform remove callback returning void 2023-03-16 15:08:36 +00:00
lm3630a_bl.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
lm3639_bl.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
lms283gf05.c
lms501kf03.c
locomolcd.c ARM: pxa: remove unused board files 2023-01-20 11:23:44 +01:00
lp855x_bl.c video: backlight: lp855x: Get PWM for PWM mode during probe 2023-06-08 16:49:11 +01:00
lp8788_bl.c backlight: lp8788_bl: Convert to platform remove callback returning void 2023-03-16 15:08:36 +00:00
ltv350qv.c video:backlight: remove reference to AVR32 architecture in ltv350qv 2022-08-03 11:11:26 +02:00
ltv350qv.h
lv5207lp.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
Makefile backlight: ktz8866: Add support for Kinetic KTZ8866 backlight 2023-02-22 10:55:28 +00:00
max8925_bl.c
mt6370-backlight.c backlight: mt6370-backlight: Convert to platform remove callback returning void 2023-03-16 15:08:36 +00:00
omap1_bl.c fbdev: omap: avoid using mach/*.h files 2022-04-21 15:01:14 +02:00
otm3225a.c
pandora_bl.c
pcf50633-backlight.c
platform_lcd.c Revert "drivers/video/backlight/platform_lcd.c: add support for device tree based probe" 2022-07-13 09:11:21 +01:00
pwm_bl.c backlight: pwm_bl: Remove unneeded checks for valid GPIOs 2023-05-25 12:27:47 +01:00
qcom-wled.c backlight: qcom-wled: Convert to platform remove callback returning void 2023-03-16 15:08:36 +00:00
rave-sp-backlight.c
rt4831-backlight.c backlight: rt4831-backlight: Convert to platform remove callback returning void 2023-03-16 15:08:37 +00:00
sky81452-backlight.c backlight: sky81452-backlight: Convert to platform remove callback returning void 2023-03-16 15:08:37 +00:00
tdo24m.c
tps65217_bl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
vgg2432a4.c
wm831x_bl.c