mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
ACPI: video: Simplify acpi_video_unregister_backlight()
When acpi_video_register() has not run yet the video_bus_head will be empty, so there is no need to check the register_count flag first. Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
c1af8bec56
commit
038a8191ae
1 changed files with 4 additions and 8 deletions
|
@ -2257,14 +2257,10 @@ void acpi_video_unregister_backlight(void)
|
||||||
{
|
{
|
||||||
struct acpi_video_bus *video;
|
struct acpi_video_bus *video;
|
||||||
|
|
||||||
mutex_lock(®ister_count_mutex);
|
mutex_lock(&video_list_lock);
|
||||||
if (register_count) {
|
list_for_each_entry(video, &video_bus_head, entry)
|
||||||
mutex_lock(&video_list_lock);
|
acpi_video_bus_unregister_backlight(video);
|
||||||
list_for_each_entry(video, &video_bus_head, entry)
|
mutex_unlock(&video_list_lock);
|
||||||
acpi_video_bus_unregister_backlight(video);
|
|
||||||
mutex_unlock(&video_list_lock);
|
|
||||||
}
|
|
||||||
mutex_unlock(®ister_count_mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool acpi_video_handles_brightness_key_presses(void)
|
bool acpi_video_handles_brightness_key_presses(void)
|
||||||
|
|
Loading…
Reference in a new issue