From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] PATCH: hwmon-abituguru-check-dmi-vendor.patch
Date: Tue, 10 Jul 2007 15:09:57 +0000 [thread overview]
Message-ID: <4693A145.4000400@hhs.nl> (raw)
In-Reply-To: <4690D52A.7040402@hhs.nl>
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Jean Delvare wrote:
> Hans,
>
> On Mon, 9 Jul 2007 20:27:46 +0200, Jean Delvare wrote:
>> On Sun, 08 Jul 2007 14:14:34 +0200, Hans de Goede wrote:
>>> With this patch the abituguru refuses to load on non Abit motherboards, as
>>> discussed in lkml CONFIG_BREAK_MY_MACHINE thread.
>>>
>>> Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
>> Thanks for doing this.
>>
>> Acked-by: Jean Delvare <khali@linux-fr.org>
>
> Thinking about it some more... You may want to skip the DMI test if the
> force module parameter is used, in case Abit stops being consistent for
> the DMI board vendor name field.
>
Good point, attached is an updated version which does that.
Regards,
Hans
[-- Attachment #2: hwmon-abituguru-check-dmi-vendor.patch --]
[-- Type: text/x-patch, Size: 1171 bytes --]
With this patch the abituguru refuses to load on non Abit motherboards, as
discussed in lkml CONFIG_BREAK_MY_MACHINE thread.
This is an updates version, which will skip this test when the force parameter
is used.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
diff -up linux-2.6.22-rc4/drivers/hwmon/abituguru.c~ linux-2.6.22-rc4/drivers/hwmon/abituguru.c
--- linux-2.6.22-rc4/drivers/hwmon/abituguru.c~ 2007-07-08 14:06:28.000000000 +0200
+++ linux-2.6.22-rc4/drivers/hwmon/abituguru.c 2007-07-10 13:19:55.000000000 +0200
@@ -31,6 +31,7 @@
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
+#include <linux/dmi.h>
#include <asm/io.h>
/* Banks */
@@ -1446,6 +1447,15 @@ static int __init abituguru_init(void)
int address, err;
struct resource res = { .flags = IORESOURCE_IO };
+#ifdef CONFIG_DMI
+ char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+
+ /* safety check, refuse to load on non Abit motherboards */
+ if (!force && (!board_vendor ||
+ strcmp(board_vendor, "http://www.abit.com.tw/")))
+ return -ENODEV;
+#endif
+
address = abituguru_detect();
if (address < 0)
return address;
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2007-07-10 15:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 12:14 [lm-sensors] PATCH: hwmon-abituguru-check-dmi-vendor.patch Hans de Goede
2007-07-08 17:52 ` Mark M. Hoffman
2007-07-08 18:06 ` Hans de Goede
2007-07-08 18:07 ` Hans de Goede
2007-07-09 18:27 ` Jean Delvare
2007-07-09 18:37 ` Jean Delvare
2007-07-09 20:37 ` Pavel Machek
2007-07-10 9:43 ` Jean Delvare
2007-07-10 15:09 ` Hans de Goede [this message]
2007-07-13 17:34 ` Jean Delvare
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=4693A145.4000400@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=lm-sensors@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 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.