Commit c2e48749 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] cyclades cleanups

From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>

- cleanups for cyclades Kconfig entry	(Adrian Bunk/me)
- janitors project: remove dead function	(Don Koch)

From: aris@cathedrallabs.org (Aristeu Sergio Rozanski Filho)

	Use the standard min/max macros
parent 15e5643c
...@@ -112,15 +112,13 @@ config CYCLADES ...@@ -112,15 +112,13 @@ config CYCLADES
tristate "Cyclades async mux support" tristate "Cyclades async mux support"
depends on SERIAL_NONSTANDARD depends on SERIAL_NONSTANDARD
---help--- ---help---
This is a driver for a card that gives you many serial ports. You This driver supports Cyclades Z and Y multiserial boards.
would need something like this to connect more than two modems to You would need something like this to connect more than two modems to
your Linux box, for instance in order to become a dial-in server. your Linux box, for instance in order to become a dial-in server.
For information about the Cyclades-Z card, read For information about the Cyclades-Z card, read
<file:drivers/char/README.cycladesZ>. <file:drivers/char/README.cycladesZ>.
As of 1.3.9x kernels, this driver's minor numbers start at 0 instead
of 32.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called cyclades. module will be called cyclades.
......
...@@ -681,20 +681,6 @@ static char rcsid[] = ...@@ -681,20 +681,6 @@ static char rcsid[] =
static void cy_throttle (struct tty_struct *tty); static void cy_throttle (struct tty_struct *tty);
static void cy_send_xchar (struct tty_struct *tty, char ch); static void cy_send_xchar (struct tty_struct *tty, char ch);
static unsigned long
cy_get_user(unsigned long *addr)
{
unsigned long result = 0;
int error = get_user (result, addr);
if (error)
printk ("cyclades: cy_get_user: error == %d\n", error);
return result;
}
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#define IS_CYC_Z(card) ((card).num_chips == -1) #define IS_CYC_Z(card) ((card).num_chips == -1)
#define Z_FPGA_CHECK(card) \ #define Z_FPGA_CHECK(card) \
...@@ -708,7 +694,7 @@ cy_get_user(unsigned long *addr) ...@@ -708,7 +694,7 @@ cy_get_user(unsigned long *addr)
((card).base_addr+ID_ADDRESS))->signature))) ((card).base_addr+ID_ADDRESS))->signature)))
#ifndef SERIAL_XMIT_SIZE #ifndef SERIAL_XMIT_SIZE
#define SERIAL_XMIT_SIZE (MIN(PAGE_SIZE, 4096)) #define SERIAL_XMIT_SIZE (min(PAGE_SIZE, 4096))
#endif #endif
#define WAKEUP_CHARS 256 #define WAKEUP_CHARS 256
...@@ -2680,7 +2666,7 @@ cy_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -2680,7 +2666,7 @@ cy_wait_until_sent(struct tty_struct *tty, int timeout)
unsigned char *base_addr; unsigned char *base_addr;
int card,chip,channel,index; int card,chip,channel,index;
unsigned long orig_jiffies; unsigned long orig_jiffies;
signed long char_time; int char_time;
if (serial_paranoia_check(info, tty->name, "cy_wait_until_sent")) if (serial_paranoia_check(info, tty->name, "cy_wait_until_sent"))
return; return;
...@@ -2705,7 +2691,7 @@ cy_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -2705,7 +2691,7 @@ cy_wait_until_sent(struct tty_struct *tty, int timeout)
if (timeout < 0) if (timeout < 0)
timeout = 0; timeout = 0;
if (timeout) if (timeout)
char_time = MIN(char_time, timeout); char_time = min(char_time, timeout);
/* /*
* If the transmitter hasn't cleared in twice the approximate * If the transmitter hasn't cleared in twice the approximate
* amount of time to send the entire FIFO, it probably won't * amount of time to send the entire FIFO, it probably won't
...@@ -2932,8 +2918,8 @@ cy_write(struct tty_struct * tty, int from_user, ...@@ -2932,8 +2918,8 @@ cy_write(struct tty_struct * tty, int from_user,
while (1) { while (1) {
int c1; int c1;
c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, c = min(count, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
SERIAL_XMIT_SIZE - info->xmit_head)); (int)(SERIAL_XMIT_SIZE - info->xmit_head)));
if (c <= 0) if (c <= 0)
break; break;
...@@ -2945,8 +2931,8 @@ cy_write(struct tty_struct * tty, int from_user, ...@@ -2945,8 +2931,8 @@ cy_write(struct tty_struct * tty, int from_user,
break; break;
} }
CY_LOCK(info, flags); CY_LOCK(info, flags);
c1 = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, c1 = min(c, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
SERIAL_XMIT_SIZE - info->xmit_head)); (int)(SERIAL_XMIT_SIZE - info->xmit_head)));
if (c1 < c) if (c1 < c)
c = c1; c = c1;
...@@ -2962,8 +2948,8 @@ cy_write(struct tty_struct * tty, int from_user, ...@@ -2962,8 +2948,8 @@ cy_write(struct tty_struct * tty, int from_user,
} else { } else {
CY_LOCK(info, flags); CY_LOCK(info, flags);
while (1) { while (1) {
c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, c = min(count, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
SERIAL_XMIT_SIZE - info->xmit_head)); (int)(SERIAL_XMIT_SIZE - info->xmit_head)));
if (c <= 0) if (c <= 0)
break; break;
......
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