mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
powerpc/therm_adt746x: Don't access non-existing register
The ADT746x don't have any register at sub-address 0, so better use an existing register for the initial test read. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Colin Leroy <colin@colino.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
cd01570717
commit
99ca177ae4
1 changed files with 1 additions and 1 deletions
|
@ -387,7 +387,7 @@ static int probe_thermostat(struct i2c_client *client,
|
||||||
i2c_set_clientdata(client, th);
|
i2c_set_clientdata(client, th);
|
||||||
th->clt = client;
|
th->clt = client;
|
||||||
|
|
||||||
rc = read_reg(th, 0);
|
rc = read_reg(th, CONFIG_REG);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
dev_err(&client->dev, "Thermostat failed to read config!\n");
|
dev_err(&client->dev, "Thermostat failed to read config!\n");
|
||||||
kfree(th);
|
kfree(th);
|
||||||
|
|
Loading…
Reference in a new issue