From: janitor@sternwelten.at
To: linux-kernel@vger.kernel.org
Cc: akpm@digeo.com, janitor@sternwelten.at
Subject: [patch 25/25] synclink: replace jiffies_from_ms() with msecs_to_jiffies()
Date: Wed, 01 Sep 2004 22:57:55 +0200 [thread overview]
Message-ID: <E1C2cB2-0007X7-2v@sputnik> (raw)
I would appreciate any comments from the janitors list.
-Nish
Description: Uses msecs_to_jiffies() instead of the custom
jiffies_from_ms().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.9-rc1-bk7-max/drivers/char/synclink.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff -puN drivers/char/synclink.c~use-msecs-to-jiffies-drivers_char_synclink drivers/char/synclink.c
--- linux-2.6.9-rc1-bk7/drivers/char/synclink.c~use-msecs-to-jiffies-drivers_char_synclink 2004-09-01 19:35:56.000000000 +0200
+++ linux-2.6.9-rc1-bk7-max/drivers/char/synclink.c 2004-09-01 19:35:56.000000000 +0200
@@ -851,8 +851,6 @@ static int mgsl_rxenable(struct mgsl_str
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 m
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_
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_struc
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_struc
/*************************************************************/
/* 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_struc
/**********************************/
/* 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_struc
/******************************/
/* 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_struc
/* 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;
_
reply other threads:[~2004-09-01 23:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1C2cB2-0007X7-2v@sputnik \
--to=janitor@sternwelten.at \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome