mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-03-06 11:40:52 +00:00
ARM: PNX4008: use msecs_to_jiffies() rather than open-coding it
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
7e20c83720
commit
eed18b5fa4
@ -53,14 +53,14 @@ static inline int wait_reset(long timeout, struct i2c_pnx_algo_data *data)
|
|||||||
static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data)
|
static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data)
|
||||||
{
|
{
|
||||||
struct timer_list *timer = &alg_data->mif.timer;
|
struct timer_list *timer = &alg_data->mif.timer;
|
||||||
int expires = I2C_PNX_TIMEOUT / (1000 / HZ);
|
unsigned long expires = msecs_to_jiffies(I2C_PNX_TIMEOUT);
|
||||||
|
|
||||||
if (expires <= 1)
|
if (expires <= 1)
|
||||||
expires = 2;
|
expires = 2;
|
||||||
|
|
||||||
del_timer_sync(timer);
|
del_timer_sync(timer);
|
||||||
|
|
||||||
dev_dbg(&alg_data->adapter.dev, "Timer armed at %lu plus %u jiffies.\n",
|
dev_dbg(&alg_data->adapter.dev, "Timer armed at %lu plus %lu jiffies.\n",
|
||||||
jiffies, expires);
|
jiffies, expires);
|
||||||
|
|
||||||
timer->expires = jiffies + expires;
|
timer->expires = jiffies + expires;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user