git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
char
/
amiserial.c
diff --git
a/drivers/char/amiserial.c
b/drivers/char/amiserial.c
index
3dc61d4
..
f11cf4e
100644
(file)
--- a/
drivers/char/amiserial.c
+++ b/
drivers/char/amiserial.c
@@
-118,10
+118,6
@@
static struct serial_state rs_table[1];
#define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state))
#define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state))
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
/*
* tmp_buf is used as a temporary buffer by serial_write. We need to
* lock it in case the copy_from_user blocks while swapping in a page,
/*
* tmp_buf is used as a temporary buffer by serial_write. We need to
* lock it in case the copy_from_user blocks while swapping in a page,
@@
-430,7
+426,7
@@
static _INLINE_ void check_modem_status(struct async_struct *info)
if ((info->flags & ASYNC_CHECK_CD) && (dstatus & SER_DCD)) {
#if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR))
if ((info->flags & ASYNC_CHECK_CD) && (dstatus & SER_DCD)) {
#if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR))
- printk("ttyS%
02
d CD now %s...", info->line,
+ printk("ttyS%d CD now %s...", info->line,
(!(status & SER_DCD)) ? "on" : "off");
#endif
if (!(status & SER_DCD))
(!(status & SER_DCD)) ? "on" : "off");
#endif
if (!(status & SER_DCD))
@@
-557,9
+553,7
@@
static void do_softint(unsigned long private_)
return;
if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
return;
if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty_wakeup(tty);
wake_up_interruptible(&tty->write_wait);
}
}
wake_up_interruptible(&tty->write_wait);
}
}
@@
-1023,9
+1017,7
@@
static void rs_flush_buffer(struct tty_struct *tty)
info->xmit.head = info->xmit.tail = 0;
local_irq_restore(flags);
wake_up_interruptible(&tty->write_wait);
info->xmit.head = info->xmit.tail = 0;
local_irq_restore(flags);
wake_up_interruptible(&tty->write_wait);
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty_wakeup(tty);
}
/*
}
/*
@@
-1564,8
+1556,8
@@
static void rs_close(struct tty_struct *tty, struct file * filp)
shutdown(info);
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
shutdown(info);
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
- if (tty->ldisc.flush_buffer)
-
tty->ldisc.flush_buffer
(tty);
+
+
tty_ldisc_flush
(tty);
tty->closing = 0;
info->event = 0;
info->tty = 0;
tty->closing = 0;
info->event = 0;
info->tty = 0;
@@
-1610,7
+1602,7
@@
static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
if (char_time == 0)
char_time = 1;
if (timeout)
if (char_time == 0)
char_time = 1;
if (timeout)
- char_time =
MIN(
char_time, timeout);
+ char_time =
min_t(unsigned long,
char_time, timeout);
/*
* If the transmitter hasn't cleared in twice the approximate
* amount of time to send the entire FIFO, it probably won't
/*
* If the transmitter hasn't cleared in twice the approximate
* amount of time to send the entire FIFO, it probably won't
@@
-2095,7
+2087,7
@@
static int __init rs_init(void)
continue;
*/
continue;
*/
- printk(KERN_INFO "ttyS%
02
d is the amiga builtin serial port\n",
+ printk(KERN_INFO "ttyS%d is the amiga builtin serial port\n",
state->line);
/* Hardware set up */
state->line);
/* Hardware set up */