public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: Jean Delvare <khali@linux-fr.org>
Cc: "Darrick J. Wong" <djwong@us.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Colin Leroy <colin@colino.net>, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] therm_adt746x: Don't access non-existing register
Date: Wed, 02 Dec 2009 09:54:02 +0100	[thread overview]
Message-ID: <1259744042.8188.397.camel@thor.local> (raw)
In-Reply-To: <20091202091951.5ec6bb83@hyperion.delvare>

On Wed, 2009-12-02 at 09:19 +0100, Jean Delvare wrote: 
> 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 driver seems to load and work fine here (on a PowerBook5,8) with the
patch, so feel free to add a Tested-By: line for me.


> * * * * *
> 
> 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);
> 
> 



-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

  reply	other threads:[~2009-12-02  8:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  8:19 [PATCH] therm_adt746x: Don't access non-existing register Jean Delvare
2009-12-02  8:54 ` Michel Dänzer [this message]
2009-12-02  9:10   ` Jean Delvare
2009-12-03 10:24     ` Michel Dänzer
2009-12-03 12:03       ` Jean Delvare
2009-12-07 22:13       ` Darrick J. Wong
2009-12-04  2:40 ` Benjamin Herrenschmidt
2009-12-04  9:34   ` Jean Delvare
2009-12-04  9:59     ` Benjamin Herrenschmidt
2009-12-04 17:16       ` [PATCH] MAINTAINERS: Add PowerPC patterns Joe Perches
2009-12-04 17:39         ` Josh Boyer
2009-12-04 18:36           ` Grant Likely
2009-12-05  2:59         ` Olof Johansson
2009-12-08  4:56         ` Benjamin Herrenschmidt
2009-12-08  5:11           ` Joe Perches
2009-12-04 10:20     ` [PATCH] therm_adt746x: Don't access non-existing register Colin Leroy
2009-12-04 10:42       ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259744042.8188.397.camel@thor.local \
    --to=michel@daenzer.net \
    --cc=benh@kernel.crashing.org \
    --cc=colin@colino.net \
    --cc=djwong@us.ibm.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox