mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-12 23:54:19 +08:00
thinkpad-acpi: Port to new backlight interface selection API
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
56d5c34a94
commit
b33c6ce5f2
@ -83,6 +83,7 @@
|
|||||||
#include <sound/control.h>
|
#include <sound/control.h>
|
||||||
#include <sound/initval.h>
|
#include <sound/initval.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
#include <acpi/video.h>
|
||||||
|
|
||||||
/* ThinkPad CMOS commands */
|
/* ThinkPad CMOS commands */
|
||||||
#define TP_CMOS_VOLUME_DOWN 0
|
#define TP_CMOS_VOLUME_DOWN 0
|
||||||
@ -3487,7 +3488,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||||||
/* Do not issue duplicate brightness change events to
|
/* Do not issue duplicate brightness change events to
|
||||||
* userspace. tpacpi_detect_brightness_capabilities() must have
|
* userspace. tpacpi_detect_brightness_capabilities() must have
|
||||||
* been called before this point */
|
* been called before this point */
|
||||||
if (acpi_video_backlight_support()) {
|
if (acpi_video_get_backlight_type() != acpi_backlight_vendor) {
|
||||||
pr_info("This ThinkPad has standard ACPI backlight "
|
pr_info("This ThinkPad has standard ACPI backlight "
|
||||||
"brightness control, supported by the ACPI "
|
"brightness control, supported by the ACPI "
|
||||||
"video driver\n");
|
"video driver\n");
|
||||||
@ -6491,7 +6492,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (acpi_video_backlight_support()) {
|
if (acpi_video_get_backlight_type() != acpi_backlight_vendor) {
|
||||||
if (brightness_enable > 1) {
|
if (brightness_enable > 1) {
|
||||||
pr_info("Standard ACPI backlight interface "
|
pr_info("Standard ACPI backlight interface "
|
||||||
"available, not loading native one\n");
|
"available, not loading native one\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user