All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Frank <mail@dmitryfrank.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: Dmitry Frank <mail@dmitryfrank.com>,
	Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	linux-acpi@vger.kernel.org
Subject: [PATCH v2 2/3] ACPI: video: rename the global flag device_id_scheme
Date: Wed, 19 Apr 2017 12:48:08 +0300	[thread overview]
Message-ID: <20170419094809.12895-3-mail@dmitryfrank.com> (raw)
In-Reply-To: <20170419094809.12895-1-mail@dmitryfrank.com>

This flag forces device_id_scheme bit in the struct
acpi_video_device_attrib to be assumed even if not actually set, so a
better name for the global flag would be "force_device_id_scheme".

Signed-off-by: Dmitry Frank <mail@dmitryfrank.com>
---
 drivers/acpi/acpi_video.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 9a607af971e7..cfd3bed57bed 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -73,8 +73,12 @@ module_param(report_key_events, int, 0644);
 MODULE_PARM_DESC(report_key_events,
 	"0: none, 1: output changes, 2: brightness changes, 3: all");
 
-static bool device_id_scheme = false;
-module_param(device_id_scheme, bool, 0444);
+/*
+ * Whether the struct acpi_video_device_attrib::device_id_scheme bit should be
+ * assumed even if not actually set.
+ */
+static bool force_device_id_scheme = false;
+module_param(force_device_id_scheme, bool, 0444);
 
 static bool only_lcd = false;
 module_param(only_lcd, bool, 0444);
@@ -387,9 +391,9 @@ static int video_disable_backlight_sysfs_if(
 	return 0;
 }
 
-static int video_set_device_id_scheme(const struct dmi_system_id *d)
+static int video_set_force_device_id_scheme(const struct dmi_system_id *d)
 {
-	device_id_scheme = true;
+	force_device_id_scheme = true;
 	return 0;
 }
 
@@ -491,7 +495,7 @@ static struct dmi_system_id video_dmi_table[] = {
 	 */
 	{
 	 /* https://bugzilla.kernel.org/show_bug.cgi?id=104121 */
-	 .callback = video_set_device_id_scheme,
+	 .callback = video_set_force_device_id_scheme,
 	 .ident = "ESPRIMO Mobile M9410",
 	 .matches = {
 		DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
@@ -1111,7 +1115,7 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
 
 	attribute = acpi_video_get_device_attr(video, device_id);
 
-	if (attribute && (attribute->device_id_scheme || device_id_scheme)) {
+	if (attribute && (attribute->device_id_scheme || force_device_id_scheme)) {
 		switch (attribute->display_type) {
 		case ACPI_VIDEO_DISPLAY_CRT:
 			data->flags.crt = 1;
-- 
2.11.0


  parent reply	other threads:[~2017-04-19 10:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 12:35 [PATCH] acpi: video: get rid of magic numbers and use enum instead Dmitry Frank
2017-04-19  0:42 ` Rafael J. Wysocki
2017-04-19  9:58   ` Dmitry Frank
2017-04-19 10:12   ` Dmitry Frank
2017-04-19  9:48 ` [PATCH v2 0/3] ACPI: video: get rid of magic numbers, do other refactoring Dmitry Frank
2017-04-19  9:48   ` [PATCH v2 1/3] ACPI: video: get rid of magic numbers and use enum instead Dmitry Frank
2017-04-19  9:48   ` Dmitry Frank [this message]
2017-04-19 10:23     ` [PATCH v2 2/3] ACPI: video: rename the global flag device_id_scheme Rafael J. Wysocki
2017-04-19 10:40       ` Dmitry Frank
2017-04-19  9:48   ` [PATCH v2 3/3] ACPI: video: add comments about subtle cases Dmitry Frank
2017-04-19 10:36 ` [PATCH v3 0/2] ACPI: video: get rid of magic numbers, do other refactoring Dmitry Frank
2017-04-19 10:36   ` [PATCH v3 1/2] ACPI: video: get rid of magic numbers and use enum instead Dmitry Frank
2017-04-19 19:36     ` Rafael J. Wysocki
2017-04-19 19:44       ` Dmitry Frank
2017-04-19 20:15         ` Rafael J. Wysocki
2017-04-20 10:40           ` Rafael J. Wysocki
2017-04-20 10:46             ` Dmitry Frank
2017-04-19 10:36   ` [PATCH v3 2/2] ACPI: video: add comments about subtle cases Dmitry Frank

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=20170419094809.12895-3-mail@dmitryfrank.com \
    --to=mail@dmitryfrank.com \
    --cc=felipe.contreras@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.