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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
ia64
/
hp
/
sim
/
simserial.c
diff --git
a/arch/ia64/hp/sim/simserial.c
b/arch/ia64/hp/sim/simserial.c
index
0e5c6ae
..
324ea75
100644
(file)
--- a/
arch/ia64/hp/sim/simserial.c
+++ b/
arch/ia64/hp/sim/simserial.c
@@
-16,7
+16,6
@@
* 07/30/02 D. Mosberger Replace sti()/cli() with explicit spinlocks & local irq masking
*/
* 07/30/02 D. Mosberger Replace sti()/cli() with explicit spinlocks & local irq masking
*/
-#include <linux/config.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/sched.h>
@@
-47,7
+46,7
@@
#define NR_PORTS 1 /* only one port for now */
#define NR_PORTS 1 /* only one port for now */
-#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ?
SA_SHIRQ : SA_INTERRUPT
)
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ?
IRQF_SHARED : IRQF_DISABLED
)
#define SSC_GETCHAR 21
#define SSC_GETCHAR 21
@@
-93,7
+92,7
@@
static struct serial_uart_config uart_config[] = {
{ "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO |
UART_STARTECH },
{ "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO},
{ "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO |
UART_STARTECH },
{ "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO},
- {
0
, 0}
+ {
NULL
, 0}
};
struct tty_driver *hp_simserial_driver;
};
struct tty_driver *hp_simserial_driver;
@@
-131,7
+130,7
@@
static void rs_start(struct tty_struct *tty)
#endif
}
#endif
}
-static void receive_chars(struct tty_struct *tty
, struct pt_regs *regs
)
+static void receive_chars(struct tty_struct *tty)
{
unsigned char ch;
static unsigned char seen_esc = 0;
{
unsigned char ch;
static unsigned char seen_esc = 0;
@@
-153,7
+152,7
@@
static void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
ch = ia64_ssc(0, 0, 0, 0,
SSC_GETCHAR);
while (!ch);
ch = ia64_ssc(0, 0, 0, 0,
SSC_GETCHAR);
while (!ch);
- handle_sysrq(ch,
regs,
NULL);
+ handle_sysrq(ch, NULL);
}
#endif
seen_esc = 0;
}
#endif
seen_esc = 0;
@@
-171,7
+170,7
@@
static void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
/*
* This is the serial driver's interrupt routine for a single port
*/
/*
* This is the serial driver's interrupt routine for a single port
*/
-static irqreturn_t rs_interrupt_single(int irq, void *dev_id
, struct pt_regs * regs
)
+static irqreturn_t rs_interrupt_single(int irq, void *dev_id)
{
struct async_struct * info;
{
struct async_struct * info;
@@
-188,7
+187,7
@@
static irqreturn_t rs_interrupt_single(int irq, void *dev_id, struct pt_regs * r
* pretty simple in our case, because we only get interrupts
* on inbound traffic
*/
* pretty simple in our case, because we only get interrupts
* on inbound traffic
*/
- receive_chars(info->tty
, regs
);
+ receive_chars(info->tty);
return IRQ_HANDLED;
}
return IRQ_HANDLED;
}
@@
-210,7
+209,7
@@
static void do_serial_bh(void)
}
#endif
}
#endif
-static void do_softint(
void
*private_)
+static void do_softint(
struct work_struct
*private_)
{
printk(KERN_ERR "simserial: do_softint called\n");
}
{
printk(KERN_ERR "simserial: do_softint called\n");
}
@@
-489,7
+488,7
@@
static int rs_ioctl(struct tty_struct *tty, struct file * file,
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
-static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_set_termios(struct tty_struct *tty, struct
k
termios *old_termios)
{
unsigned int cflag = tty->termios->c_cflag;
{
unsigned int cflag = tty->termios->c_cflag;
@@
-556,7
+555,7
@@
static void shutdown(struct async_struct * info)
if (info->xmit.buf) {
free_page((unsigned long) info->xmit.buf);
if (info->xmit.buf) {
free_page((unsigned long) info->xmit.buf);
- info->xmit.buf =
0
;
+ info->xmit.buf =
NULL
;
}
if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags);
}
if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags);
@@
-629,7
+628,7
@@
static void rs_close(struct tty_struct *tty, struct file * filp)
if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty);
if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty);
info->event = 0;
if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty);
if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty);
info->event = 0;
- info->tty =
0
;
+ info->tty =
NULL
;
if (info->blocked_open) {
if (info->close_delay)
schedule_timeout_interruptible(info->close_delay);
if (info->blocked_open) {
if (info->close_delay)
schedule_timeout_interruptible(info->close_delay);
@@
-669,7
+668,7
@@
static void rs_hangup(struct tty_struct *tty)
info->event = 0;
state->count = 0;
info->flags &= ~ASYNC_NORMAL_ACTIVE;
info->event = 0;
state->count = 0;
info->flags &= ~ASYNC_NORMAL_ACTIVE;
- info->tty =
0
;
+ info->tty =
NULL
;
wake_up_interruptible(&info->open_wait);
}
wake_up_interruptible(&info->open_wait);
}
@@
-685,12
+684,11
@@
static int get_async_struct(int line, struct async_struct **ret_info)
*ret_info = sstate->info;
return 0;
}
*ret_info = sstate->info;
return 0;
}
- info = k
m
alloc(sizeof(struct async_struct), GFP_KERNEL);
+ info = k
z
alloc(sizeof(struct async_struct), GFP_KERNEL);
if (!info) {
sstate->count--;
return -ENOMEM;
}
if (!info) {
sstate->count--;
return -ENOMEM;
}
- memset(info, 0, sizeof(struct async_struct));
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
init_waitqueue_head(&info->delta_msr_wait);
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
init_waitqueue_head(&info->delta_msr_wait);
@@
-699,7
+697,7
@@
static int get_async_struct(int line, struct async_struct **ret_info)
info->flags = sstate->flags;
info->xmit_fifo_size = sstate->xmit_fifo_size;
info->line = line;
info->flags = sstate->flags;
info->xmit_fifo_size = sstate->xmit_fifo_size;
info->line = line;
- INIT_WORK(&info->work, do_softint
, info
);
+ INIT_WORK(&info->work, do_softint);
info->state = sstate;
if (sstate->info) {
kfree(info);
info->state = sstate;
if (sstate->info) {
kfree(info);
@@
-715,7
+713,7
@@
startup(struct async_struct *info)
{
unsigned long flags;
int retval=0;
{
unsigned long flags;
int retval=0;
- irq
return_t (*handler)(int, void *, struct pt_regs *)
;
+ irq
_handler_t handler
;
struct serial_state *state= info->state;
unsigned long page;
struct serial_state *state= info->state;
unsigned long page;
@@
-770,7
+768,7
@@
startup(struct async_struct *info)
/*
* Insert serial port into IRQ chain.
*/
/*
* Insert serial port into IRQ chain.
*/
- info->prev_port =
0
;
+ info->prev_port =
NULL
;
info->next_port = IRQ_ports[state->irq];
if (info->next_port)
info->next_port->prev_port = info;
info->next_port = IRQ_ports[state->irq];
if (info->next_port)
info->next_port->prev_port = info;
@@
-941,7
+939,7
@@
static inline void show_serial_version(void)
printk(KERN_INFO " no serial options enabled\n");
}
printk(KERN_INFO " no serial options enabled\n");
}
-static struct tty_operations hp_ops = {
+static
const
struct tty_operations hp_ops = {
.open = rs_open,
.close = rs_close,
.write = rs_write,
.open = rs_open,
.close = rs_close,
.write = rs_write,