public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* [Fwd: [PATCH] therm_adt746x: Don't access non-existing register]
@ 2009-12-04  2:41 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2009-12-04  2:41 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: Forwarded message - [PATCH] therm_adt746x: Don't access non-existing register --]
[-- Type: message/rfc822, Size: 3776 bytes --]

From: Jean Delvare <khali@linux-fr.org>
To: "Michel Dänzer" <michel@daenzer.net>, "Darrick J. Wong" <djwong@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>, LKML <linux-kernel@vger.kernel.org>, Colin Leroy <colin@colino.net>, Paul Mackerras <paulus@samba.org>
Subject: [PATCH] therm_adt746x: Don't access non-existing register
Date: Wed, 2 Dec 2009 09:19:51 +0100
Message-ID: <20091202091951.5ec6bb83@hyperion.delvare>

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would
be interested in testing and carrying the following patch. I've sent it
to Colin Leroy, who is listed as the maintainer for this driver, 1.5
month ago, but did not hear back.

* * * * *

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>
Tested-by: Tim Shepard <shep@alum.mit.edu>
Cc: Colin Leroy <colin@colino.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
---
 drivers/macintosh/therm_adt746x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.32-rc4.orig/drivers/macintosh/therm_adt746x.c	2009-10-12 11:53:59.000000000 +0200
+++ linux-2.6.32-rc4/drivers/macintosh/therm_adt746x.c	2009-10-14 17:27:46.000000000 +0200
@@ -387,7 +387,7 @@ static int probe_thermostat(struct i2c_c
 	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);


-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-04  2:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04  2:41 [Fwd: [PATCH] therm_adt746x: Don't access non-existing register] Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox