Commit b3cd39c1 authored by Maximilian Attems's avatar Maximilian Attems Committed by Linus Torvalds

[PATCH] synclink: replace jiffies_from_ms() with msecs_to_jiffies()

Uses msecs_to_jiffies() instead of the custom jiffies_from_ms().
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 80ec557f
......@@ -851,8 +851,6 @@ static int mgsl_rxenable(struct mgsl_struct * info, int enable);
static int mgsl_wait_event(struct mgsl_struct * info, int __user *mask);
static int mgsl_loopmode_send_done( struct mgsl_struct * info );
#define jiffies_from_ms(a) ((((a) * HZ)/1000)+1)
/* set non-zero on successful registration with PCI subsystem */
static int pci_registered;
......@@ -4171,7 +4169,7 @@ int load_next_tx_holding_buffer(struct mgsl_struct *info)
info->get_tx_holding_index=0;
/* restart transmit timer */
mod_timer(&info->tx_timer, jiffies + jiffies_from_ms(5000));
mod_timer(&info->tx_timer, jiffies + msecs_to_jiffies(5000));
ret = 1;
}
......@@ -5800,7 +5798,7 @@ void usc_start_transmitter( struct mgsl_struct *info )
usc_TCmd( info, TCmd_SendFrame );
info->tx_timer.expires = jiffies + jiffies_from_ms(5000);
info->tx_timer.expires = jiffies + msecs_to_jiffies(5000);
add_timer(&info->tx_timer);
}
info->tx_active = 1;
......@@ -7196,7 +7194,7 @@ BOOLEAN mgsl_irq_test( struct mgsl_struct *info )
EndTime=100;
while( EndTime-- && !info->irq_occurred ) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(jiffies_from_ms(10));
schedule_timeout(msecs_to_jiffies(10));
}
spin_lock_irqsave(&info->irq_spinlock,flags);
......@@ -7335,7 +7333,7 @@ BOOLEAN mgsl_dma_test( struct mgsl_struct *info )
/*************************************************************/
/* Wait 100ms for interrupt. */
EndTime = jiffies + jiffies_from_ms(100);
EndTime = jiffies + msecs_to_jiffies(100);
for(;;) {
if (time_after(jiffies, EndTime)) {
......@@ -7391,7 +7389,7 @@ BOOLEAN mgsl_dma_test( struct mgsl_struct *info )
/**********************************/
/* Wait 100ms */
EndTime = jiffies + jiffies_from_ms(100);
EndTime = jiffies + msecs_to_jiffies(100);
for(;;) {
if (time_after(jiffies, EndTime)) {
......@@ -7433,7 +7431,7 @@ BOOLEAN mgsl_dma_test( struct mgsl_struct *info )
/******************************/
/* Wait 100ms */
EndTime = jiffies + jiffies_from_ms(100);
EndTime = jiffies + msecs_to_jiffies(100);
/* While timer not expired wait for transmit complete */
......@@ -7464,7 +7462,7 @@ BOOLEAN mgsl_dma_test( struct mgsl_struct *info )
/* WAIT FOR RECEIVE COMPLETE */
/* Wait 100ms */
EndTime = jiffies + jiffies_from_ms(100);
EndTime = jiffies + msecs_to_jiffies(100);
/* Wait for 16C32 to write receive status to buffer entry. */
status=info->rx_buffer_list[0].status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment