Commit dece0b32 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

I2C: sparse cleanups again, based on comments from lkml

This is more like the original code.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 2b118bd4
......@@ -170,11 +170,8 @@ static inline u8 FAN_TO_REG(long rpm, int div)
static int DIV_TO_REG(int val)
{
int answer = 0;
val >>= 1;
while (val) {
while ((val >>= 1) != 0)
answer++;
val >>= 1;
}
return answer;
}
#define DIV_FROM_REG(val) (1 << (val))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment