[lm-sensors] [PATCH 3/3] hwmon: (sht15) add checksum validation support

Vivien Didelot vivien.didelot at savoirfairelinux.com
Tue Apr 12 00:14:26 CEST 2011


Excerpts from Jonathan Cameron's message of 2011-04-08 14:33:07 -0400:
> Why a u8? It is boolean. Obviously that'll work in a u8 but it almost
> implicitly implies it might contain some data.
> > +    u8                checksumming;

Ok, I've updated flags with the bool type.

> If it's a flag, perhaps u8 implies it might be something other than 0 or 1.
> Admittedly this is true of some of the other elements, but we live and learn.
> >      u8                flag;

As it represents the different states the driver may be in (i.e. what
action it is doing), I've changed it to an enumeration of actions
(nothing, reading temp or humid).

Regards,
Vivien.




More information about the lm-sensors mailing list