From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (tmp401) Add support for TMP431
Date: Mon, 25 Mar 2013 08:33:45 +0000 [thread overview]
Message-ID: <20130325093345.76be0311@endymion.delvare> (raw)
In-Reply-To: <1364017421-28279-1-git-send-email-linux@roeck-us.net>
Hi Guenter,
On Fri, 22 Mar 2013 22:43:41 -0700, Guenter Roeck wrote:
> TMP431 is compatible to TMP401.
>
> Also add support for additional I2C addresses supported by TMP411B
> and TMP411C.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Documentation/hwmon/tmp401 | 16 ++++++++++------
> drivers/hwmon/Kconfig | 4 ++--
> drivers/hwmon/tmp401.c | 11 ++++++++---
> 3 files changed, 20 insertions(+), 11 deletions(-)
> (...)
> diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c
> index c85f696..763115a 100644
> --- a/drivers/hwmon/tmp401.c
> +++ b/drivers/hwmon/tmp401.c
> @@ -40,9 +40,9 @@
> #include <linux/sysfs.h>
>
> /* Addresses to scan */
> -static const unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END };
> +static const unsigned short normal_i2c[] = { 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
Without address checks in the detect function, you are accepting all
supported chips at all of these addresses. Some combinations are not
possible, so I think you should reject them in order to make false
positives less likely.
Other than this, it looks good.
Acked-by: Jean Delvare <khali@linux-fr.org>
Don't forget to update sensors-detect to map the TMP431 chip to the
tmp401 driver.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2013-03-25 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-23 5:43 [lm-sensors] [PATCH] hwmon: (tmp401) Add support for TMP431 Guenter Roeck
2013-03-25 8:33 ` Jean Delvare [this message]
2013-03-25 13:00 ` Guenter Roeck
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=20130325093345.76be0311@endymion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.