[patch] fscpos driver

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

 



Hi Stefan,

> As I was using the old sensor lib I didn't realize my inN_input values
> were using the wrong units. Sorry for this.
> 
> Signed-off-by: Stefan Ott <stefan at xxxxxxxxx>
> 
> --- fscpos.c-orig	2005-01-20 18:21:01.000000000 +0100
> +++ fscpos.c	2005-01-20 18:21:33.000000000 +0100
> @@ -239,7 +239,7 @@
>  }
>  
>  /* Volts */
> -#define VOLT_FROM_REG(val, mult)	((val) * (mult) / 255)
> +#define VOLT_FROM_REG(val, mult)	(((val) * (mult) / 255) * 10)
>  
>  static ssize_t show_volt_12(struct device *dev, char *buf)
>  {
> 

Hmm, wouldn't it more efficient to multiply all "mult" constants by 10
directly?

-- 
Jean Delvare
http://khali.linux-fr.org/



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux