mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
Merge branch 'acpi-cleanup'
* acpi-cleanup: (21 commits) ACPI / dock: fix error return code in dock_add() ACPI / dock: Drop unnecessary local variable from dock_add() ACPI / dock / PCI: Drop ACPI dock notifier chain ACPI / dock: Do not check CONFIG_ACPI_DOCK_MODULE ACPI / dock: Do not leak memory on falilures to add a dock station ACPI: Drop ACPI bus notifier call chain ACPI / dock: Rework the handling of notifications ACPI / dock: Simplify dock_init_hotplug() and dock_release_hotplug() ACPI / dock: Walk list in reverse order during removal of devices ACPI / dock: Rework and simplify find_dock_devices() ACPI / dock: Drop the hp_lock mutex from struct dock_station ACPI: simplify acpiphp driver with new helper functions ACPI: simplify dock driver with new helper functions ACPI: Export acpi_(bay)|(dock)_match() from scan.c ACPI: introduce two helper functions for _EJ0 and _LCK ACPI: introduce helper function acpi_execute_simple_method() ACPI: introduce helper function acpi_has_method() ACPI / dock: simplify dock_create_acpi_device() ACPI / dock: mark initialization functions with __init ACPI / dock: drop redundant spin lock in dock station object ...
This commit is contained in:
commit
c92f56cbdf
17 changed files with 331 additions and 578 deletions
|
@ -53,14 +53,13 @@ acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
|
|||
void **retyurn_value)
|
||||
{
|
||||
long *cap = context;
|
||||
acpi_handle h_dummy;
|
||||
|
||||
if (ACPI_SUCCESS(acpi_get_handle(handle, "_BCM", &h_dummy)) &&
|
||||
ACPI_SUCCESS(acpi_get_handle(handle, "_BCL", &h_dummy))) {
|
||||
if (acpi_has_method(handle, "_BCM") &&
|
||||
acpi_has_method(handle, "_BCL")) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found generic backlight "
|
||||
"support\n"));
|
||||
*cap |= ACPI_VIDEO_BACKLIGHT;
|
||||
if (ACPI_FAILURE(acpi_get_handle(handle, "_BQC", &h_dummy)))
|
||||
if (!acpi_has_method(handle, "_BQC"))
|
||||
printk(KERN_WARNING FW_BUG PREFIX "No _BQC method, "
|
||||
"cannot determine initial brightness\n");
|
||||
/* We have backlight support, no need to scan further */
|
||||
|
@ -79,22 +78,20 @@ acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
|
|||
*/
|
||||
long acpi_is_video_device(acpi_handle handle)
|
||||
{
|
||||
acpi_handle h_dummy;
|
||||
long video_caps = 0;
|
||||
|
||||
/* Is this device able to support video switching ? */
|
||||
if (ACPI_SUCCESS(acpi_get_handle(handle, "_DOD", &h_dummy)) ||
|
||||
ACPI_SUCCESS(acpi_get_handle(handle, "_DOS", &h_dummy)))
|
||||
if (acpi_has_method(handle, "_DOD") || acpi_has_method(handle, "_DOS"))
|
||||
video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING;
|
||||
|
||||
/* Is this device able to retrieve a video ROM ? */
|
||||
if (ACPI_SUCCESS(acpi_get_handle(handle, "_ROM", &h_dummy)))
|
||||
if (acpi_has_method(handle, "_ROM"))
|
||||
video_caps |= ACPI_VIDEO_ROM_AVAILABLE;
|
||||
|
||||
/* Is this device able to configure which video head to be POSTed ? */
|
||||
if (ACPI_SUCCESS(acpi_get_handle(handle, "_VPO", &h_dummy)) &&
|
||||
ACPI_SUCCESS(acpi_get_handle(handle, "_GPD", &h_dummy)) &&
|
||||
ACPI_SUCCESS(acpi_get_handle(handle, "_SPD", &h_dummy)))
|
||||
if (acpi_has_method(handle, "_VPO") &&
|
||||
acpi_has_method(handle, "_GPD") &&
|
||||
acpi_has_method(handle, "_SPD"))
|
||||
video_caps |= ACPI_VIDEO_DEVICE_POSTING;
|
||||
|
||||
/* Only check for backlight functionality if one of the above hit. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue