ChangeSet 1.1722.111.26, 2004/06/14 09:45:55-07:00, greg@kroah.com I2C: sparse cleanups again, based on comments from lkml This is more like the original code. Signed-off-by: Greg Kroah-Hartman drivers/i2c/chips/it87.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c --- a/drivers/i2c/chips/it87.c Tue Jun 22 09:46:48 2004 +++ b/drivers/i2c/chips/it87.c Tue Jun 22 09:46:48 2004 @@ -170,11 +170,8 @@ 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))