Re: [PATCH 1/3] hwmon: (lm90) Simplify handling of extended local temp register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 24, 2011 at 02:35:20PM -0400, Jean Delvare wrote:
> The optional extended local temperature register can never have
> address 0, as this address is already used by another register. Thus
> we can get rid of flag LM90_HAVE_LOCAL_EXT and simply rely on
> reg_local_ext being non-zero to determine if a given chip has this
> extension or not. This makes the code more simple.
> 
> Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
> Cc: Stijn Devriendt <sdevrien@xxxxxxxxx>
> Cc: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
> ---
> Notes:
> * This patch fixes a bug as a side effect: chip type max6657 lacked
>   the definition of reg_local_ext. I can submit a separate patch for
>   this, or it can be fixed in the patch which broke it (as it isn't in
>   Linus' tree yet) and I'll adjust this one accordingly, or this patch
>   can be merged in the patch which broke it altogether. All options
>   are fine with me. Guenter?
> * Another approach would be to keep MAX6657_REG_R_LOCAL_TEMPL, but set
>   it automatically in lm90_probe(). Opinions?
> 
I prefer your fix; it makes the code simpler.

Regarding the max6657 problem - I'll fix that in the original patch and apply this one
on top of my queue.
 
Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux