Messages in this thread Patch in this message | | | Subject | Re: [PATCH] Driver Core patches for 2.6.7 | Date | Tue, 22 Jun 2004 10:41:53 -0700 | From | Greg KH <> |
| |
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 <greg@kroah.com>
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |