提交 55d68d75 编写于 作者: J Juerg Haefliger 提交者: Jean Delvare

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: NJuerg Haefliger <juergh@gmail.com>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 73ce48f6
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册