aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_video.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-06-20 11:49:57 +0200
committerHans de Goede <hdegoede@redhat.com>2022-09-03 12:17:27 +0200
commit77ab9d4d44cd235322d2f30b1c4026302c3ce8c6 (patch)
tree377363c899a3a549cc1f4880ff4e5dbb492db193 /drivers/acpi/acpi_video.c
parentplatform/x86: samsung-laptop: Move acpi_backlight=[vendor|native] quirks to ACPI video_detect.c (diff)
downloadlinux-dev-77ab9d4d44cd235322d2f30b1c4026302c3ce8c6.tar.xz
linux-dev-77ab9d4d44cd235322d2f30b1c4026302c3ce8c6.zip
ACPI: video: Remove acpi_video_set_dmi_backlight_type()
acpi_video_set_dmi_backlight_type() is troublesome because it may end up getting called after other backlight drivers have already called acpi_video_get_backlight_type() resulting in the other drivers already being registered even though they should not. In case of the acpi_video backlight, acpi_video_set_dmi_backlight_type() actually calls acpi_video_unregister_backlight() since that is often probed earlier, leading to userspace seeing the acpi_video0 class device being briefly available, leading to races in userspace where udev probe-rules try to access the device and it is already gone. All callers have been fixed to no longer call it, so remove acpi_video_set_dmi_backlight_type() now. This means we now also no longer need acpi_video_unregister_backlight() for the remove acpi_video backlight after it was wrongly registered hack, so remove that too. Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/acpi/acpi_video.c')
-rw-r--r--drivers/acpi/acpi_video.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index d1e41f30c004..a7c3d11e0dac 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -2296,16 +2296,6 @@ void acpi_video_register_backlight(void)
}
EXPORT_SYMBOL(acpi_video_register_backlight);
-void acpi_video_unregister_backlight(void)
-{
- struct acpi_video_bus *video;
-
- mutex_lock(&video_list_lock);
- list_for_each_entry(video, &video_bus_head, entry)
- acpi_video_bus_unregister_backlight(video);
- mutex_unlock(&video_list_lock);
-}
-
bool acpi_video_handles_brightness_key_presses(void)
{
return may_report_brightness_keys &&