Thread (14 messages) flat view 14 messages, 5 authors, 2011-08-12
STALE5519d

[RFC PATCH 6/6] hwmon: OMAP4: On die temperature sensor driver

From: Guenter Roeck <hidden>
Date: 2011-08-11 16:38:22
Also in: linux-omap

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help