Re: [PATCH] TSL2550: extended mode bugfix

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

 



> Operating on values before you check for errors is wrong. I'd rather do:
> 
>     ret = tsl2550_calculate_lux(ch0, ch1);
>     if (ret < 0)
>         return ret;
>     if (data->operating_mode == 1) /* extended mode */
>         ret *= 5;

I just wanted to suggest the same :) Pity that "operating_mode" is exported to
sysfs, "extended_mode" would have been a better name, me thinks...

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux