diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-21 07:58:13 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-12 12:32:42 -0500 |
commit | eed18b5fa4d297c681b00144e8c6942dd35d39a7 (patch) | |
tree | c81e0ed47151ca16b57bbfd203e8c9c073a47598 /drivers/i2c/busses | |
parent | 7e20c837208f6fdd553d04f5fe3e80f44570698b (diff) |
ARM: PNX4008: use msecs_to_jiffies() rather than open-coding it
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-pnx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index ecdd5230ae36..2b0bd0b042d6 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c | |||
@@ -53,14 +53,14 @@ static inline int wait_reset(long timeout, struct i2c_pnx_algo_data *data) | |||
53 | static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data) | 53 | static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data) |
54 | { | 54 | { |
55 | struct timer_list *timer = &alg_data->mif.timer; | 55 | struct timer_list *timer = &alg_data->mif.timer; |
56 | int expires = I2C_PNX_TIMEOUT / (1000 / HZ); | 56 | unsigned long expires = msecs_to_jiffies(I2C_PNX_TIMEOUT); |
57 | 57 | ||
58 | if (expires <= 1) | 58 | if (expires <= 1) |
59 | expires = 2; | 59 | expires = 2; |
60 | 60 | ||
61 | del_timer_sync(timer); | 61 | del_timer_sync(timer); |
62 | 62 | ||
63 | dev_dbg(&alg_data->adapter.dev, "Timer armed at %lu plus %u jiffies.\n", | 63 | dev_dbg(&alg_data->adapter.dev, "Timer armed at %lu plus %lu jiffies.\n", |
64 | jiffies, expires); | 64 | jiffies, expires); |
65 | 65 | ||
66 | timer->expires = jiffies + expires; | 66 | timer->expires = jiffies + expires; |