Re: [PATCH] Driver Core patches for 2.6.7

From: Greg KH
Date: Tue Jun 22 2004 - 12:57:34 EST


ChangeSet 1.1722.111.26, 2004/06/14 09:45:55-07:00, greg@xxxxxxxxx

I2C: sparse cleanups again, based on comments from lkml

This is more like the original code.

Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


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))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/