Commit e391c471 authored by Vaibhav Gupta's avatar Vaibhav Gupta

software: kernel: Remove temp and temp_ready from fmctdc_dev

'temp_ready' was never used 'temp' is a value which has to be retrieved
from the device at the same moment when it is required. Thus, there is
no point to have a structure member for it in 'fmctdc_dev'.
Reported-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent 49c38117
......@@ -253,10 +253,7 @@ struct fmctdc_dev {
uint8_t ds18_id[8];
/* next temperature measurement pending? */
unsigned long next_t;
/* temperature, degrees Celsius scaled by 16 and its ready flag */
int temp;
int temp_ready;
/* Hardware Monitoring */
char *hwmon_temp_sensor_id;
struct device *hwmon_dev;
/* output lots of debug stuff? */
......
......@@ -198,7 +198,7 @@ static int ft_zio_info_get(struct device *dev, struct zio_attribute *zattr,
struct zio_device *zdev;
struct fmctdc_dev *ft;
struct zio_attribute *attr;
int ret;
int ret, val;
if (__ft_get_type(dev) == FT_TYPE_INPUT)
return ft_zio_info_channel(dev, zattr, usr_val);
......@@ -212,10 +212,10 @@ static int ft_zio_info_get(struct device *dev, struct zio_attribute *zattr,
*usr_val = ft->mode;
break;
case FT_ATTR_PARAM_TEMP:
ret = ft_temperature_get(ft, &ft->temp);
ret = ft_temperature_get(ft, &val);
if (ret < 0)
return ret;
*usr_val = ft->temp;
*usr_val = val;
break;
case FT_ATTR_DEV_COARSE:
case FT_ATTR_DEV_SECONDS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment