From: Paul Fulghum <paulkf@microgate.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH] 2.6.9-rc1-bk9 synclink_cs.c kernel janitor changes
Date: 03 Sep 2004 13:04:37 -0500 [thread overview]
Message-ID: <1094234676.4313.13.camel@deimos.microgate.com> (raw)
Kernel janitor changes:
* use kernel provided min/max
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Paul Fulghum <paulkf@microgate.com>
* use kernel provided msecs_to_jiffies
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Please apply.
--
Paul Fulghum
paulkf@microgate.com
--- linux-2.6.9/drivers/char/pcmcia/synclink_cs.c 2004-09-02 11:23:58.000000000 -0500
+++ linux-2.6.9-mg/drivers/char/pcmcia/synclink_cs.c 2004-09-03 12:49:25.178204163 -0500
@@ -1,7 +1,7 @@
/*
* linux/drivers/char/pcmcia/synclink_cs.c
*
- * $Id: synclink_cs.c,v 4.26 2004/08/11 19:30:02 paulkf Exp $
+ * $Id: synclink_cs.c,v 4.28 2004/09/03 15:46:40 paulkf Exp $
*
* Device driver for Microgate SyncLink PC Card
* multiprotocol serial adapter.
@@ -41,6 +41,7 @@
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/timer.h>
+#include <linux/time.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/tty.h>
@@ -443,8 +444,6 @@
static int set_rxenable(MGSLPC_INFO *info, int enable);
static int wait_events(MGSLPC_INFO *info, int __user *mask);
-#define jiffies_from_ms(a) ((((a) * HZ)/1000)+1)
-
static MGSLPC_INFO *mgslpc_device_list = NULL;
static int mgslpc_device_count = 0;
@@ -484,7 +483,7 @@
MODULE_LICENSE("GPL");
static char *driver_name = "SyncLink PC Card driver";
-static char *driver_version = "$Revision: 4.26 $";
+static char *driver_version = "$Revision: 4.28 $";
static struct tty_driver *serial_driver;
@@ -494,10 +493,6 @@
static void mgslpc_change_params(MGSLPC_INFO *info);
static void mgslpc_wait_until_sent(struct tty_struct *tty, int timeout);
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
/* PCMCIA prototypes */
static void mgslpc_config(dev_link_t *link);
@@ -1191,7 +1186,7 @@
return;
while (info->tx_count && fifo_count) {
- c = MIN(2, MIN(fifo_count, MIN(info->tx_count, TXBUFSIZE - info->tx_get)));
+ c = min(2, min_t(int, fifo_count, min(info->tx_count, TXBUFSIZE - info->tx_get)));
if (c == 1) {
write_reg(info, CHA + TXFIFO, *(info->tx_buf + info->tx_get));
@@ -1754,8 +1749,8 @@
}
for (;;) {
- c = MIN(count,
- MIN(TXBUFSIZE - info->tx_count - 1,
+ c = min(count,
+ min(TXBUFSIZE - info->tx_count - 1,
TXBUFSIZE - info->tx_put));
if (c <= 0)
break;
@@ -2641,7 +2636,7 @@
char_time = 1;
if (timeout)
- char_time = MIN(char_time, timeout);
+ char_time = min_t(unsigned long, char_time, timeout);
if (info->params.mode == MGSL_MODE_HDLC) {
while (info->tx_active) {
@@ -3654,7 +3649,7 @@
} else {
info->tx_active = 1;
tx_ready(info);
- info->tx_timer.expires = jiffies + jiffies_from_ms(5000);
+ info->tx_timer.expires = jiffies + msecs_to_jiffies(5000);
add_timer(&info->tx_timer);
}
}
@@ -4114,7 +4109,7 @@
end_time=100;
while(end_time-- && !info->irq_occurred) {
set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(jiffies_from_ms(10));
+ schedule_timeout(msecs_to_jiffies(10));
}
info->testing_irq = FALSE;
reply other threads:[~2004-09-03 18:09 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=1094234676.4313.13.camel@deimos.microgate.com \
--to=paulkf@microgate.com \
--cc=akpm@osdl.org \
--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