hwmon (dme1737): skip detection if forced
Subsystems (2)
PATCH 2/3 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 at gmail.com>
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>
drivers/hwmon/dme1737.c +10 -7
@@ -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 ;
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if
Quoted 4 lines · Juerg Haefliger
Skip the checking of the device ID register in the hwmon register block if the
force_idoption is used.Signed-off-by Juerg Haefliger <juergh at gmail.com>
Of course, otherwise the force_id parameter just can't work. Good catch.
Acked-by Jean Delvare <[email protected]>
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors