Commit 038a8191 authored by Hans de Goede's avatar Hans de Goede
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent c1af8bec
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -2257,15 +2257,11 @@ void acpi_video_unregister_backlight(void)
{
	struct acpi_video_bus *video;

	mutex_lock(&register_count_mutex);
	if (register_count) {
	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);
}
	mutex_unlock(&register_count_mutex);
}

bool acpi_video_handles_brightness_key_presses(void)
{