[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down

On 04/24/2012 04:40 PM, Alex Hung wrote:
> The tp_features.bright_acpimode will not be set correctly for brightness
> control because ACPI_VIDEO_HID will not be located in ACPI. As a result,
> a duplicated key event will always be sent. acpi_video_backlight_support()
> is sufficient to detect standard ACPI brightness control.
> Signed-off-by: Alex Hung<alex.hung@xxxxxxxxxxxxx>
> ---
>   drivers/platform/x86/thinkpad_acpi.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 7b82868..7d032d5 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -3405,7 +3405,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
>   	/* Do not issue duplicate brightness change events to
>   	 * userspace. tpacpi_detect_brightness_capabilities() must have
>   	 * been called before this point  */
> -	if (tp_features.bright_acpimode&&  acpi_video_backlight_support()) {
> +	if (acpi_video_backlight_support()) {
>   		pr_info("This ThinkPad has standard ACPI backlight "
>   			"brightness control, supported by the ACPI "
>   			"video driver\n");

I tested the patch on thinkpad x200 and x220, and the brightness up/down 
key presses will no longer generate a duplicated event, i.e. output from 
"sudo showkey".

Best Regards,
Alex Hung

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
ibm-acpi-devel mailing list

[Site Home]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux