From: Felipe Contreras <felipe.contreras@gmail.com>
To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, Len Brown <lenb@kernel.org>,
Zhang Rui <rui.zhang@intel.com>, Aaron Lu <aaron.lwe@gmail.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH] acpi: video: fix reversed indexed BQC
Date: Thu, 1 Aug 2013 18:34:02 -0500 [thread overview]
Message-ID: <1375400042-989-1-git-send-email-felipe.contreras@gmail.com> (raw)
Commit 1a7c618 (ACPI video: support _BQC/_BCL/_BCM methods that use
index values) assumed that bl->levels were not reverted, but at this
point they already are, so there's no need to revert them yet again.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/acpi/video.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 0ec434d..b27c049 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -499,19 +499,10 @@ acpi_video_bqc_value_to_level(struct acpi_video_device *device,
{
unsigned long long level;
- if (device->brightness->flags._BQC_use_index) {
- /*
- * _BQC returns an index that doesn't account for
- * the first 2 items with special meaning, so we need
- * to compensate for that by offsetting ourselves
- */
- if (device->brightness->flags._BCL_reversed)
- bqc_value = device->brightness->count - 3 - bqc_value;
-
+ if (device->brightness->flags._BQC_use_index)
level = device->brightness->levels[bqc_value + 2];
- } else {
+ else
level = bqc_value;
- }
level += bqc_offset_aml_bug_workaround;
--
1.8.3.4
next reply other threads:[~2013-08-01 23:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 23:34 Felipe Contreras [this message]
2013-08-02 2:03 ` [PATCH] acpi: video: fix reversed indexed BQC Aaron Lu
2013-08-02 4:11 ` Felipe Contreras
2013-08-02 4:30 ` Aaron Lu
2013-08-02 4:50 ` Felipe Contreras
2013-08-02 4:59 ` Aaron Lu
2013-08-02 6:44 ` Felipe Contreras
2013-08-02 6:56 ` Aaron Lu
2013-08-02 7:59 ` Felipe Contreras
2013-08-02 8:06 ` Aaron Lu
2013-08-02 8:14 ` Felipe Contreras
2013-08-02 8:25 ` Aaron Lu
2013-08-02 11:20 ` Felipe Contreras
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=1375400042-989-1-git-send-email-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=aaron.lwe@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=rui.zhang@intel.com \
/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