From: Juerg Haefliger <juergh@gmail.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if forced
Date: Wed, 23 Apr 2008 05:24:56 +0000 [thread overview]
Message-ID: <480EC828.8080105@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
Skip the checking of the device ID register in the hwmon register block
if the force_id option is used.
Signed-off-by: Juerg Haefliger <juergh at gmail.com>
[-- Attachment #2: dme1737-skip-detection-if-forced.patch --]
[-- Type: text/x-patch, Size: 1091 bytes --]
Skip the checking of the device ID register in the hwmon register block if
the force_id option is used.
Signed-off-by: Juerg Haefliger <juergh at gmail.com>
Index: linux/drivers/hwmon/dme1737.c
===================================================================
--- linux.orig/drivers/hwmon/dme1737.c 2008-04-22 22:02:45.000000000 -0700
+++ linux/drivers/hwmon/dme1737.c 2008-04-22 22:09:10.000000000 -0700
@@ -2360,13 +2360,16 @@
client->addr = res->start;
platform_set_drvdata(pdev, data);
- company = dme1737_read(client, DME1737_REG_COMPANY);
- device = dme1737_read(client, DME1737_REG_DEVICE);
-
- if (!((company == DME1737_COMPANY_SMSC) &&
- (device == SCH311X_DEVICE))) {
- err = -ENODEV;
- goto exit_kfree;
+ /* Skip chip detection if module is loaded with force_id parameter */
+ if (!force_id) {
+ company = dme1737_read(client, DME1737_REG_COMPANY);
+ device = dme1737_read(client, DME1737_REG_DEVICE);
+
+ if (!((company == DME1737_COMPANY_SMSC) &&
+ (device == SCH311X_DEVICE))) {
+ err = -ENODEV;
+ goto exit_kfree;
+ }
}
data->type = -1;
[-- 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 reply other threads:[~2008-04-23 5:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 5:24 Juerg Haefliger [this message]
2008-04-25 6:43 ` [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if 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=480EC828.8080105@gmail.com \
--to=juergh@gmail.com \
--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.