diff mbox series

[1/1] hwmon: nct7802: Fix for temp6 (PECI1) processed even if PECI1 disabled

Message ID dc61a61e-5c34-1216-b841-347f65221de3@kontron.com (mailing list archive)
State Superseded
Headers show
Series [1/1] hwmon: nct7802: Fix for temp6 (PECI1) processed even if PECI1 disabled | expand

Commit Message

Gilles Buloz July 21, 2023, 4:38 p.m. UTC
Fix for temp6 (PECI1) processed even if PECI1 disabled

Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
---
  drivers/hwmon/nct7802.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck July 21, 2023, 4:57 p.m. UTC | #1
On 7/21/23 09:38, Gilles BULOZ wrote:
> Fix for temp6 (PECI1) processed even if PECI1 disabled
> 
You should describe the problem here.

Guenter

> Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
> ---
>   drivers/hwmon/nct7802.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/nct7802.c b/drivers/hwmon/nct7802.c
> index 9339bfc..024cff1 100644
> --- a/drivers/hwmon/nct7802.c
> +++ b/drivers/hwmon/nct7802.c
> @@ -725,7 +725,7 @@ static umode_t nct7802_temp_is_visible(struct kobject *kobj,
>       if (index >= 38 && index < 46 && !(reg & 0x01))        /* PECI 0 */
>           return 0;
> 
> -    if (index >= 0x46 && (!(reg & 0x02)))  /* PECI 1 */
> +    if (index >= 46 && !(reg & 0x02))            /* PECI 1 */
>           return 0;
> 
>       return attr->mode;
diff mbox series

Patch

diff --git a/drivers/hwmon/nct7802.c b/drivers/hwmon/nct7802.c
index 9339bfc..024cff1 100644
--- a/drivers/hwmon/nct7802.c
+++ b/drivers/hwmon/nct7802.c
@@ -725,7 +725,7 @@  static umode_t nct7802_temp_is_visible(struct kobject *kobj,
      if (index >= 38 && index < 46 && !(reg & 0x01))        /* PECI 0 */
          return 0;

-    if (index >= 0x46 && (!(reg & 0x02)))  /* PECI 1 */
+    if (index >= 46 && !(reg & 0x02))            /* PECI 1 */
          return 0;

      return attr->mode;