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]
/
drivers
/
sbus
/
char
/
aurora.c
diff --git
a/drivers/sbus/char/aurora.c
b/drivers/sbus/char/aurora.c
index
650d5e9
..
a54b4ac
100644
(file)
--- a/
drivers/sbus/char/aurora.c
+++ b/
drivers/sbus/char/aurora.c
@@
-92,7
+92,6
@@
static struct Aurora_port aurora_port[AURORA_TNPORTS] = {
/* no longer used. static struct Aurora_board * IRQ_to_board[16] = { NULL, } ;*/
static unsigned char * tmp_buf = NULL;
/* no longer used. static struct Aurora_board * IRQ_to_board[16] = { NULL, } ;*/
static unsigned char * tmp_buf = NULL;
-static DECLARE_MUTEX(tmp_buf_sem);
DECLARE_TASK_QUEUE(tq_aurora);
DECLARE_TASK_QUEUE(tq_aurora);
@@
-124,25
+123,25
@@
static inline int aurora_paranoia_check(struct Aurora_port const * port,
*/
/* Get board number from pointer */
*/
/* Get board number from pointer */
-
extern
inline int board_No (struct Aurora_board const * bp)
+
static
inline int board_No (struct Aurora_board const * bp)
{
return bp - aurora_board;
}
/* Get port number from pointer */
{
return bp - aurora_board;
}
/* Get port number from pointer */
-
extern
inline int port_No (struct Aurora_port const * port)
+
static
inline int port_No (struct Aurora_port const * port)
{
return AURORA_PORT(port - aurora_port);
}
/* Get pointer to board from pointer to port */
{
return AURORA_PORT(port - aurora_port);
}
/* Get pointer to board from pointer to port */
-
extern
inline struct Aurora_board * port_Board(struct Aurora_port const * port)
+
static
inline struct Aurora_board * port_Board(struct Aurora_port const * port)
{
return &aurora_board[AURORA_BOARD(port - aurora_port)];
}
/* Wait for Channel Command Register ready */
{
return &aurora_board[AURORA_BOARD(port - aurora_port)];
}
/* Wait for Channel Command Register ready */
-
extern
inline void aurora_wait_CCR(struct aurora_reg128 * r)
+
static
inline void aurora_wait_CCR(struct aurora_reg128 * r)
{
unsigned long delay;
{
unsigned long delay;
@@
-161,7
+160,7
@@
printk("aurora_wait_CCR\n");
*/
/* Must be called with enabled interrupts */
*/
/* Must be called with enabled interrupts */
-
extern
inline void aurora_long_delay(unsigned long delay)
+
static
inline void aurora_long_delay(unsigned long delay)
{
unsigned long i;
{
unsigned long i;
@@
-255,7
+254,7
@@
for(i=0;i<TYPE_1_IRQS;i++)
return 0;
}
return 0;
}
-static irqreturn_t aurora_interrupt(int irq, void * dev_id
, struct pt_regs * regs
);
+static irqreturn_t aurora_interrupt(int irq, void * dev_id);
/* Main probing routine, also sets irq. */
static int aurora_probe(void)
/* Main probing routine, also sets irq. */
static int aurora_probe(void)
@@
-338,19
+337,19
@@
static int aurora_probe(void)
printk("intr pri %d\n", grrr);
#endif
if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) &&
printk("intr pri %d\n", grrr);
#endif
if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) &&
- !request_irq(bp->irq|0x30, aurora_interrupt,
SA_SHIRQ
, "sio16", bp)) {
+ !request_irq(bp->irq|0x30, aurora_interrupt,
IRQF_SHARED
, "sio16", bp)) {
free_irq(bp->irq|0x30, bp);
} else
if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) &&
free_irq(bp->irq|0x30, bp);
} else
if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) &&
- !request_irq(bp->irq|0x30, aurora_interrupt,
SA_SHIRQ
, "sio16", bp)) {
+ !request_irq(bp->irq|0x30, aurora_interrupt,
IRQF_SHARED
, "sio16", bp)) {
free_irq(bp->irq|0x30, bp);
} else
if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) &&
free_irq(bp->irq|0x30, bp);
} else
if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) &&
- !request_irq(bp->irq|0x30, aurora_interrupt,
SA_SHIRQ
, "sio16", bp)) {
+ !request_irq(bp->irq|0x30, aurora_interrupt,
IRQF_SHARED
, "sio16", bp)) {
free_irq(bp->irq|0x30, bp);
} else
for(grrr=0;grrr<TYPE_1_IRQS;grrr++) {
free_irq(bp->irq|0x30, bp);
} else
for(grrr=0;grrr<TYPE_1_IRQS;grrr++) {
- if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt,
SA_SHIRQ
, "sio16", bp)) {
+ if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt,
IRQF_SHARED
, "sio16", bp)) {
free_irq(bp->irq|0x30, bp);
break;
} else {
free_irq(bp->irq|0x30, bp);
break;
} else {
@@
-420,7
+419,7
@@
static void aurora_release_io_range(struct Aurora_board *bp)
sbus_iounmap((unsigned long)bp->r3, 4);
}
sbus_iounmap((unsigned long)bp->r3, 4);
}
-
extern
inline void aurora_mark_event(struct Aurora_port * port, int event)
+
static
inline void aurora_mark_event(struct Aurora_port * port, int event)
{
#ifdef AURORA_DEBUG
printk("aurora_mark_event: start\n");
{
#ifdef AURORA_DEBUG
printk("aurora_mark_event: start\n");
@@
-690,7
+689,7
@@
static void aurora_check_modem(struct Aurora_board const * bp, int chip)
}
/* The main interrupt processing routine */
}
/* The main interrupt processing routine */
-static irqreturn_t aurora_interrupt(int irq, void * dev_id
, struct pt_regs * regs
)
+static irqreturn_t aurora_interrupt(int irq, void * dev_id)
{
unsigned char status;
unsigned char ack,chip/*,chip_id*/;
{
unsigned char status;
unsigned char ack,chip/*,chip_id*/;
@@
-871,8
+870,7
@@
static irqreturn_t aurora_interrupt(int irq, void * dev_id, struct pt_regs * reg
#ifdef AURORA_INT_DEBUG
static void aurora_timer (unsigned long ignored);
#ifdef AURORA_INT_DEBUG
static void aurora_timer (unsigned long ignored);
-static struct timer_list aurora_poll_timer =
- TIMER_INITIALIZER(aurora_timer, 0, 0);
+static DEFINE_TIMER(aurora_poll_timer, aurora_timer, 0, 0);
static void
aurora_timer (unsigned long ignored)
static void
aurora_timer (unsigned long ignored)
@@
-911,14
+909,14
@@
static int aurora_setup_board(struct Aurora_board * bp)
#ifdef AURORA_ALLIRQ
int i;
for (i = 0; i < AURORA_ALLIRQ; i++) {
#ifdef AURORA_ALLIRQ
int i;
for (i = 0; i < AURORA_ALLIRQ; i++) {
- error = request_irq(allirq[i]|0x30, aurora_interrupt,
SA_SHIRQ
,
+ error = request_irq(allirq[i]|0x30, aurora_interrupt,
IRQF_SHARED
,
"sio16", bp);
if (error)
printk(KERN_ERR "IRQ%d request error %d\n",
allirq[i], error);
}
#else
"sio16", bp);
if (error)
printk(KERN_ERR "IRQ%d request error %d\n",
allirq[i], error);
}
#else
- error = request_irq(bp->irq|0x30, aurora_interrupt,
SA_SHIRQ
,
+ error = request_irq(bp->irq|0x30, aurora_interrupt,
IRQF_SHARED
,
"sio16", bp);
if (error) {
printk(KERN_ERR "IRQ request error %d\n", error);
"sio16", bp);
if (error) {
printk(KERN_ERR "IRQ request error %d\n", error);
@@
-1515,8
+1513,7
@@
static void aurora_close(struct tty_struct * tty, struct file * filp)
*/
timeout = jiffies+HZ;
while(port->SRER & SRER_TXEMPTY) {
*/
timeout = jiffies+HZ;
while(port->SRER & SRER_TXEMPTY) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(port->timeout);
+ msleep_interruptible(jiffies_to_msecs(port->timeout));
if (time_after(jiffies, timeout))
break;
}
if (time_after(jiffies, timeout))
break;
}
@@
-1533,8
+1530,7
@@
static void aurora_close(struct tty_struct * tty, struct file * filp)
port->tty = 0;
if (port->blocked_open) {
if (port->close_delay) {
port->tty = 0;
if (port->blocked_open) {
if (port->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(port->close_delay);
+ msleep_interruptible(jiffies_to_msecs(port->close_delay));
}
wake_up_interruptible(&port->open_wait);
}
}
wake_up_interruptible(&port->open_wait);
}
@@
-2191,7
+2187,7
@@
static void do_softint(void *private_)
#endif
}
#endif
}
-static struct tty_operations aurora_ops = {
+static
const
struct tty_operations aurora_ops = {
.open = aurora_open,
.close = aurora_close,
.write = aurora_write,
.open = aurora_open,
.close = aurora_close,
.write = aurora_write,