Re: [PATCH] hwmon: (w83795) temp4_type has writable permission

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

 



Both datasheet and the comments of store_temp_mode() tell us that temp1~4 is writable, so fix it.

Huacai
 
------------------ Original ------------------
From:  "Guenter Roeck"<linux@xxxxxxxxxxxx>;
Date:  Thu, Nov 15, 2018 01:23 PM
To:  "Huacai Chen"<chenhc@xxxxxxxxxx>;
Cc:  "Jean Delvare"<jdelvare@xxxxxxxx>; "linux-hwmon"<linux-hwmon@xxxxxxxxxxxxxxx>; "Fuxin Zhang"<zhangfx@xxxxxxxxxx>; "Yao Wang"<wangyao@xxxxxxxxxx>;
Subject:  Re: [PATCH] hwmon: (w83795) temp4_type has writable permission
 
On Thu, Nov 15, 2018 at 10:44:57AM +0800, Huacai Chen wrote:
> Signed-off-by: Yao Wang <wangyao@xxxxxxxxxx>
> Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx>

Sorry, that really lacks context. Please add some details.

Guenter

> ---
>  drivers/hwmon/w83795.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
> index 49276bb..1bb80f9 100644
> --- a/drivers/hwmon/w83795.c
> +++ b/drivers/hwmon/w83795.c
> @@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
>   * somewhere else in the code
>   */
>  #define SENSOR_ATTR_TEMP(index) {	\
> -	SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
> +	SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
>  show_temp_mode, store_temp_mode, NOT_USED, index - 1),	\
>  SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp,	\
>  NULL, TEMP_READ, index - 1),	\
> -- 
> 2.7.0
>




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux