mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
73ce48f6c6
commit
55d68d75ab
1 changed files with 9 additions and 6 deletions
|
@ -2360,13 +2360,16 @@ static int __devinit dme1737_isa_probe(struct platform_device *pdev)
|
||||||
client->addr = res->start;
|
client->addr = res->start;
|
||||||
platform_set_drvdata(pdev, data);
|
platform_set_drvdata(pdev, data);
|
||||||
|
|
||||||
company = dme1737_read(client, DME1737_REG_COMPANY);
|
/* Skip chip detection if module is loaded with force_id parameter */
|
||||||
device = dme1737_read(client, DME1737_REG_DEVICE);
|
if (!force_id) {
|
||||||
|
company = dme1737_read(client, DME1737_REG_COMPANY);
|
||||||
|
device = dme1737_read(client, DME1737_REG_DEVICE);
|
||||||
|
|
||||||
if (!((company == DME1737_COMPANY_SMSC) &&
|
if (!((company == DME1737_COMPANY_SMSC) &&
|
||||||
(device == SCH311X_DEVICE))) {
|
(device == SCH311X_DEVICE))) {
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto exit_kfree;
|
goto exit_kfree;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
data->type = -1;
|
data->type = -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue