public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@canonical.com>
To: Alex Hung <alex.hung@canonical.com>
Cc: ibm-acpi@hmh.eng.br, mjg@redhat.com,
	ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [ibm-acpi-devel] [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down
Date: Tue, 24 Apr 2012 16:44:50 +0800	[thread overview]
Message-ID: <4F966802.10907@canonical.com> (raw)
In-Reply-To: <1335256852-19146-1-git-send-email-alex.hung@canonical.com>

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@canonical.com>
> ---
>   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");

Hi,
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

  reply	other threads:[~2012-04-24  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  8:40 [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down Alex Hung
2012-04-24  8:44 ` Alex Hung [this message]
2012-05-03 20:32 ` Matthew Garrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F966802.10907@canonical.com \
    --to=alex.hung@canonical.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox