aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/dme1737.c
diff options
context:
space:
mode:
authorJuerg Haefliger <juergh@gmail.com>2008-08-06 22:41:03 +0200
committerJean Delvare <khali@mahadeva.delvare>2008-08-06 22:41:03 +0200
commit55d68d75ab00e60953f8784af5927b60967a297f (patch)
tree0bca79817ca9f92ad557eaab17daba8359468ff1 /drivers/hwmon/dme1737.c
parent73ce48f6c6b9d9dcf6a2bba0bcde39ede76809f0 (diff)
downloadkernel_samsung_smdk4412-55d68d75ab00e60953f8784af5927b60967a297f.zip
kernel_samsung_smdk4412-55d68d75ab00e60953f8784af5927b60967a297f.tar.gz
kernel_samsung_smdk4412-55d68d75ab00e60953f8784af5927b60967a297f.tar.bz2
hwmon: (dme1737) Skip detection if forced
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@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/dme1737.c')
-rw-r--r--drivers/hwmon/dme1737.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c
index 9635fa6..b362900 100644
--- a/drivers/hwmon/dme1737.c
+++ b/drivers/hwmon/dme1737.c
@@ -2360,13 +2360,16 @@ static int __devinit dme1737_isa_probe(struct platform_device *pdev)
client->addr = res->start;
platform_set_drvdata(pdev, data);
- company = dme1737_read(client, DME1737_REG_COMPANY);
- device = dme1737_read(client, DME1737_REG_DEVICE);
+ /* 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;
+ if (!((company == DME1737_COMPANY_SMSC) &&
+ (device == SCH311X_DEVICE))) {
+ err = -ENODEV;
+ goto exit_kfree;
+ }
}
data->type = -1;