Commit 4c8c92fd authored by Vaibhav Gupta's avatar Vaibhav Gupta

Revert "software: kernel: second parameter of ft_temperature_get() is not required"

This reverts commit 0e1a7ecd.
Reported-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent eda1485d
...@@ -386,7 +386,7 @@ static inline void ft_disable(struct fmctdc_dev *ft, unsigned int chan) ...@@ -386,7 +386,7 @@ static inline void ft_disable(struct fmctdc_dev *ft, unsigned int chan)
ft_writel(ft, ien, TDC_REG_INPUT_ENABLE); ft_writel(ft, ien, TDC_REG_INPUT_ENABLE);
} }
extern int ft_temperature_get(struct fmctdc_dev *ft); extern int ft_temperature_get(struct fmctdc_dev *ft, int *temp);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0)
extern int ft_hwmon_init(struct fmctdc_dev *fd); extern int ft_hwmon_init(struct fmctdc_dev *fd);
......
...@@ -124,16 +124,16 @@ static int ft_raw_mode_get(struct fmctdc_dev *ft, ...@@ -124,16 +124,16 @@ static int ft_raw_mode_get(struct fmctdc_dev *ft,
int ft_temperature_get(struct fmctdc_dev *ft) int ft_temperature_get(struct fmctdc_dev *ft, int *temp)
{ {
int stat = ft_ioread(ft, ft->ft_owregs_base + TDC_OW_REG_CSR); int stat = ft_ioread(ft, ft->ft_owregs_base + TDC_OW_REG_CSR);
if (!(stat & TDC_OW_CSR_VALID)) if (!(stat & TDC_OW_CSR_VALID))
return -EIO; return -EIO;
ft->temp = ft_ioread(ft, ft->ft_owregs_base + TDC_OW_REG_TEMP); *temp = ft_ioread(ft, ft->ft_owregs_base + TDC_OW_REG_TEMP);
return ft->temp; return 0;
} }
static int ft_unique_id_get(struct fmctdc_dev *ft, uint64_t *id) static int ft_unique_id_get(struct fmctdc_dev *ft, uint64_t *id)
...@@ -212,9 +212,10 @@ static int ft_zio_info_get(struct device *dev, struct zio_attribute *zattr, ...@@ -212,9 +212,10 @@ static int ft_zio_info_get(struct device *dev, struct zio_attribute *zattr,
*usr_val = ft->mode; *usr_val = ft->mode;
break; break;
case FT_ATTR_PARAM_TEMP: case FT_ATTR_PARAM_TEMP:
ret = ft_temperature_get(ft); ret = ft_temperature_get(ft, &ft->temp);
if (ret < 0) if (ret < 0)
return ret; return ret;
*usr_val = ft->temp;
break; break;
case FT_ATTR_DEV_COARSE: case FT_ATTR_DEV_COARSE:
case FT_ATTR_DEV_SECONDS: 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