From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Subject: [PATCH 1/5] thinkpad-acpi: silence hotkey enable warning for module parameter
Date: Mon, 13 Apr 2009 23:44:10 -0300 [thread overview]
Message-ID: <1239677054-3221-2-git-send-email-hmh@hmh.eng.br> (raw)
In-Reply-To: <1239677054-3221-1-git-send-email-hmh@hmh.eng.br>
Avoid the WARN() when the procfs handler for hotkey enable is used by
a module parameter. Instead, urge the user to stop doing that.
Reported-by: Niel Lambrechts <niel.lambrechts@gmail.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
---
drivers/platform/x86/thinkpad_acpi.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index a40b075..a186c5b 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2946,12 +2946,18 @@ static int hotkey_read(char *p)
return len;
}
-static void hotkey_enabledisable_warn(void)
+static void hotkey_enabledisable_warn(bool enable)
{
tpacpi_log_usertask("procfs hotkey enable/disable");
- WARN(1, TPACPI_WARN
- "hotkey enable/disable functionality has been "
- "removed from the driver. Hotkeys are always enabled.\n");
+ if (!WARN((tpacpi_lifecycle == TPACPI_LIFE_RUNNING || !enable),
+ TPACPI_WARN
+ "hotkey enable/disable functionality has been "
+ "removed from the driver. Hotkeys are always "
+ "enabled\n"))
+ printk(TPACPI_ERR
+ "Please remove the hotkey=enable module "
+ "parameter, it is deprecated. Hotkeys are always "
+ "enabled\n");
}
static int hotkey_write(char *buf)
@@ -2971,9 +2977,9 @@ static int hotkey_write(char *buf)
res = 0;
while ((cmd = next_cmd(&buf))) {
if (strlencmp(cmd, "enable") == 0) {
- hotkey_enabledisable_warn();
+ hotkey_enabledisable_warn(1);
} else if (strlencmp(cmd, "disable") == 0) {
- hotkey_enabledisable_warn();
+ hotkey_enabledisable_warn(0);
res = -EPERM;
} else if (strlencmp(cmd, "reset") == 0) {
mask = hotkey_orig_mask;
--
1.6.2.1
next prev parent reply other threads:[~2009-04-14 2:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 2:44 [GIT PATCH] thinkpad-acpi late queue Henrique de Moraes Holschuh
2009-04-14 2:44 ` Henrique de Moraes Holschuh [this message]
2009-04-14 2:44 ` [PATCH 2/5] thinkpad-acpi: fix LED blinking through timer trigger Henrique de Moraes Holschuh
2009-04-21 19:44 ` [stable] " Chris Wright
2009-04-22 3:11 ` Henrique de Moraes Holschuh
2009-04-25 4:25 ` Henrique de Moraes Holschuh
2009-04-14 2:44 ` [PATCH 3/5] thinkpad-acpi: fix use of MODULE_AUTHOR Henrique de Moraes Holschuh
2009-04-14 2:44 ` [PATCH 4/5] thinkpad-acpi: simplify module autoloading Henrique de Moraes Holschuh
2009-04-14 2:44 ` [PATCH 5/5] thinkpad-acpi: bump up version to 0.23 Henrique de Moraes Holschuh
2009-04-18 5:22 ` [GIT PATCH] thinkpad-acpi late queue Len Brown
[not found] ` <alpine.LFD.2.00.0904180122090.30751-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-18 13:02 ` Henrique de Moraes Holschuh
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=1239677054-3221-2-git-send-email-hmh@hmh.eng.br \
--to=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@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