Hi,
Le 18/10/2010 18:08, Guenter Roeck a écrit :
On Sun, Oct 17, 2010 at 11:50:11AM -0400, Simon Guinot wrote:
+static void __set_fan_ctrl(struct gpio_fan_data *fan_data, int ctrl_val)
+{
+ int i;
+
+ for (i = 0; i< fan_data->num_ctrl; i++) {
+ int value = !!(ctrl_val& (1<< i));
+
value = (ctrl_val& (1>> i));
would be much simpler and easier to understand.
IMHO you mean:
value = (ctrl_val>> i)& 1;
Cheers,
Chris
_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors