On Thu, 2011-08-11 at 09:00 -0400, J, KEERTHY wrote:
On Thu, Aug 11, 2011 at 4:06 PM, Felipe Balbi [off-list ref] wrote:
[ ... ]
quoted
quoted
quoted
quoted
+ temp = omap_temp_sensor_readl(temp_sensor,
+ temp_sensor->registers->bgap_counter);
+ temp = (temp & temp_sensor->registers->counter_mask) >>
+ __ffs(temp_sensor->registers->counter_mask);
temp &= ??
quoted
+ temp = temp * 1000 / (temp_sensor->clk_rate);
temp *= ??
Need to multiply the temp with 1000 before dividing.
temp *= evaluates the RHS first and then multiplies LHS.
temp *= 1000;
temp /= clk_rate;
Different coding style. I preferred to do it in a single line.
Me too.
Guenter