From: Thomas Renninger <trenn@suse.de>
To: linux-acpi@vger.kernel.org
Cc: "Brown, Len" <len.brown@intel.com>, acpi4asus-user@lists.sourceforge.net
Subject: [PATCH] Repost: asus strict model checking
Date: Tue, 01 Aug 2006 15:15:22 +0200 [thread overview]
Message-ID: <1154438122.4302.354.camel@queen.suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]
These are some minor patches I already posted...
All are patched against 2.6.18-rc2.
Do only load asus acpi module when model is listed
Description: There are machines that have a device with HID: ATK0100
(Asus) and a device with HID SNY5001 (Sony). Bad things happen if sony
and asus driver are loaded there.
Reference: https://bugzilla.novell.org/show_bug.cgi?id=166920
Signed-off-by: Timo Hoenig <thoenig@suse.de>
Signed-off-by: Thomas Renninger<mail@renninger.de>
drivers/acpi/asus_acpi.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
Index: linux-2.6.18-rc2/drivers/acpi/asus_acpi.c
===================================================================
--- linux-2.6.18-rc2.orig/drivers/acpi/asus_acpi.c
+++ linux-2.6.18-rc2/drivers/acpi/asus_acpi.c
@@ -77,10 +77,14 @@ MODULE_LICENSE("GPL");
static uid_t asus_uid;
static gid_t asus_gid;
+static int force;
module_param(asus_uid, uint, 0);
MODULE_PARM_DESC(asus_uid, "UID for entries in /proc/acpi/asus.\n");
module_param(asus_gid, uint, 0);
MODULE_PARM_DESC(asus_gid, "GID for entries in /proc/acpi/asus.\n");
+module_param(force, int, 0);
+MODULE_PARM_DESC(force, "Force loading of the module even if the laptop"
+ "model is not listed.\n");
/* For each model, all features implemented,
* those marked with R are relative to HOTK, A for absolute */
@@ -1171,11 +1175,22 @@ static int asus_hotk_get_info(void)
printk(KERN_NOTICE
" Samsung P30 detected, supported\n");
} else {
- hotk->model = M2E;
- printk(KERN_NOTICE " unsupported model %s, trying "
- "default values\n", string);
- printk(KERN_NOTICE
- " send /proc/acpi/dsdt to the developers\n");
+ if (force){
+ hotk->model = M2E;
+ printk(KERN_NOTICE " unsupported model"
+ "%s, trying default values\n",
+ string);
+ printk(KERN_NOTICE
+ " send /proc/acpi/dsdt"
+ " to the developers\n");
+ }
+ else{
+ printk(KERN_NOTICE " %s unsupported model %s,"
+ " aborting.\nForce loading with force=1"
+ " parameter\n",
+ ACPI_HOTK_NAME, string);
+ return -ENODEV;
+ }
}
hotk->methods = &model_conf[hotk->model];
return AE_OK;
[-- Attachment #2: acpi_asus_strict_model_check.patch --]
[-- Type: text/x-patch, Size: 1982 bytes --]
Do only load asus acpi module when model is listed
Reference: https://bugzilla.novell.org/show_bug.cgi?id=166920
Signed-off-by: Timo Hoenig <thoenig@suse.de>
Signed-off-by: Thomas Renninger<mail@renninger.de>
drivers/acpi/asus_acpi.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
Index: linux-2.6.18-rc2/drivers/acpi/asus_acpi.c
===================================================================
--- linux-2.6.18-rc2.orig/drivers/acpi/asus_acpi.c
+++ linux-2.6.18-rc2/drivers/acpi/asus_acpi.c
@@ -77,10 +77,14 @@ MODULE_LICENSE("GPL");
static uid_t asus_uid;
static gid_t asus_gid;
+static int force;
module_param(asus_uid, uint, 0);
MODULE_PARM_DESC(asus_uid, "UID for entries in /proc/acpi/asus.\n");
module_param(asus_gid, uint, 0);
MODULE_PARM_DESC(asus_gid, "GID for entries in /proc/acpi/asus.\n");
+module_param(force, int, 0);
+MODULE_PARM_DESC(force, "Force loading of the module even if the laptop"
+ "model is not listed.\n");
/* For each model, all features implemented,
* those marked with R are relative to HOTK, A for absolute */
@@ -1171,11 +1175,22 @@ static int asus_hotk_get_info(void)
printk(KERN_NOTICE
" Samsung P30 detected, supported\n");
} else {
- hotk->model = M2E;
- printk(KERN_NOTICE " unsupported model %s, trying "
- "default values\n", string);
- printk(KERN_NOTICE
- " send /proc/acpi/dsdt to the developers\n");
+ if (force){
+ hotk->model = M2E;
+ printk(KERN_NOTICE " unsupported model"
+ "%s, trying default values\n",
+ string);
+ printk(KERN_NOTICE
+ " send /proc/acpi/dsdt"
+ " to the developers\n");
+ }
+ else{
+ printk(KERN_NOTICE " %s unsupported model %s,"
+ " aborting.\nForce loading with force=1"
+ " parameter\n",
+ ACPI_HOTK_NAME, string);
+ return -ENODEV;
+ }
}
hotk->methods = &model_conf[hotk->model];
return AE_OK;
next reply other threads:[~2006-08-01 13:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 13:15 Thomas Renninger [this message]
2006-08-01 13:58 ` [PATCH] Repost: asus strict model checking Alexey Starikovskiy
2006-08-01 15:29 ` Thomas Renninger
2006-08-01 16:11 ` Alexey Starikovskiy
2006-08-01 17:22 ` Thomas Renninger
2006-08-01 17:44 ` Alexey Starikovskiy
2006-08-02 10:00 ` Thomas Renninger
2006-08-02 18:49 ` Alexey Starikovskiy
2006-08-03 8:40 ` Thomas Renninger
2006-08-02 16:00 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2006-08-02 20:12 Brown, Len
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=1154438122.4302.354.camel@queen.suse.de \
--to=trenn@suse.de \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=len.brown@intel.com \
--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