summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/therm_adt746x.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-10-14 05:31:32 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-10-30 17:21:32 +1100
commit99ca177ae4d31c3fbbea7ffb213b9724e4c26233 (patch)
treedcaeb6dc3d52f94110ba7a85d045b9a247b51a19 /drivers/macintosh/therm_adt746x.c
parentcd015707176820b86d07b5dffdecfefdd539a497 (diff)
downloadblackbird-op-linux-99ca177ae4d31c3fbbea7ffb213b9724e4c26233.tar.gz
blackbird-op-linux-99ca177ae4d31c3fbbea7ffb213b9724e4c26233.zip
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>
Diffstat (limited to 'drivers/macintosh/therm_adt746x.c')
-rw-r--r--drivers/macintosh/therm_adt746x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 556f0feaa4df..95b676a19be7 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -387,7 +387,7 @@ static int probe_thermostat(struct i2c_client *client,
i2c_set_clientdata(client, th);
th->clt = client;
- rc = read_reg(th, 0);
+ rc = read_reg(th, CONFIG_REG);
if (rc < 0) {
dev_err(&client->dev, "Thermostat failed to read config!\n");
kfree(th);
OpenPOWER on IntegriCloud