Skip to content

Commit

Permalink
Fix compile errors in SGI console drivers (linux-next tree)
Browse files Browse the repository at this point in the history
The below is the patch to replace blindly all possible places,
including Jack's fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
(Reviewed and checked rather than blindly added)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Takashi Iwai authored and Linus Torvalds committed Jul 21, 2008
1 parent b1ca7e7 commit a88487c
Show file tree
Hide file tree
Showing 33 changed files with 151 additions and 147 deletions.
6 changes: 3 additions & 3 deletions drivers/serial/21285.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void serial21285_enable_ms(struct uart_port *port)
static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
struct tty_struct *tty = port->info->tty;
struct tty_struct *tty = port->info->port.tty;
unsigned int status, ch, flag, rxs, max_count = 256;

status = *CSR_UARTFLG;
Expand Down Expand Up @@ -235,8 +235,8 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
quot = uart_get_divisor(port, baud);

if (port->info && port->info->tty) {
struct tty_struct *tty = port->info->tty;
if (port->info && port->info->port.tty) {
struct tty_struct *tty = port->info->port.tty;
unsigned int b = port->uartclk / (16 * quot);
tty_encode_baud_rate(tty, b, b);
}
Expand Down
30 changes: 15 additions & 15 deletions drivers/serial/68328serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static void status_handle(struct m68k_serial *info, unsigned short status)
{
#if 0
if(status & DCD) {
if((info->tty->termios->c_cflag & CRTSCTS) &&
if((info->port.tty->termios->c_cflag & CRTSCTS) &&
((info->curregs[3] & AUTO_ENAB)==0)) {
info->curregs[3] |= AUTO_ENAB;
info->pendregs[3] |= AUTO_ENAB;
Expand All @@ -274,7 +274,7 @@ static void status_handle(struct m68k_serial *info, unsigned short status)

static void receive_chars(struct m68k_serial *info, unsigned short rx)
{
struct tty_struct *tty = info->tty;
struct tty_struct *tty = info->port.tty;
m68328_uart *uart = &uart_addr[info->line];
unsigned char ch, flag;

Expand Down Expand Up @@ -345,7 +345,7 @@ static void transmit_chars(struct m68k_serial *info)
goto clear_and_return;
}

if((info->xmit_cnt <= 0) || info->tty->stopped) {
if((info->xmit_cnt <= 0) || info->port.tty->stopped) {
/* That's peculiar... TX ints off */
uart->ustcnt &= ~USTCNT_TX_INTR_MASK;
goto clear_and_return;
Expand Down Expand Up @@ -403,7 +403,7 @@ static void do_softint(struct work_struct *work)
struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue);
struct tty_struct *tty;

tty = info->tty;
tty = info->port.tty;
if (!tty)
return;
#if 0
Expand All @@ -427,7 +427,7 @@ static void do_serial_hangup(struct work_struct *work)
struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue_hangup);
struct tty_struct *tty;

tty = info->tty;
tty = info->port.tty;
if (!tty)
return;

Expand Down Expand Up @@ -471,8 +471,8 @@ static int startup(struct m68k_serial * info)
uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK;
#endif

if (info->tty)
clear_bit(TTY_IO_ERROR, &info->tty->flags);
if (info->port.tty)
clear_bit(TTY_IO_ERROR, &info->port.tty->flags);
info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;

/*
Expand Down Expand Up @@ -506,8 +506,8 @@ static void shutdown(struct m68k_serial * info)
info->xmit_buf = 0;
}

if (info->tty)
set_bit(TTY_IO_ERROR, &info->tty->flags);
if (info->port.tty)
set_bit(TTY_IO_ERROR, &info->port.tty->flags);

info->flags &= ~S_INITIALIZED;
local_irq_restore(flags);
Expand Down Expand Up @@ -573,9 +573,9 @@ static void change_speed(struct m68k_serial *info)
unsigned cflag;
int i;

if (!info->tty || !info->tty->termios)
if (!info->port.tty || !info->port.tty->termios)
return;
cflag = info->tty->termios->c_cflag;
cflag = info->port.tty->termios->c_cflag;
if (!(port = info->port))
return;

Expand Down Expand Up @@ -1131,7 +1131,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
tty_ldisc_flush(tty);
tty->closing = 0;
info->event = 0;
info->tty = 0;
info->port.tty = NULL;
#warning "This is not and has never been valid so fix it"
#if 0
if (tty->ldisc.num != ldiscs[N_TTY].num) {
Expand Down Expand Up @@ -1169,7 +1169,7 @@ void rs_hangup(struct tty_struct *tty)
info->event = 0;
info->count = 0;
info->flags &= ~S_NORMAL_ACTIVE;
info->tty = 0;
info->port.tty = NULL;
wake_up_interruptible(&info->open_wait);
}

Expand Down Expand Up @@ -1286,7 +1286,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)

info->count++;
tty->driver_data = info;
info->tty = tty;
info->port.tty = tty;

/*
* Start up serial port
Expand Down Expand Up @@ -1363,7 +1363,7 @@ rs68328_init(void)
info = &m68k_soft[i];
info->magic = SERIAL_MAGIC;
info->port = (int) &uart_addr[i];
info->tty = 0;
info->port.tty = NULL;
info->irq = uart_irqs[i];
info->custom_divisor = 16;
info->close_delay = 50;
Expand Down
52 changes: 26 additions & 26 deletions drivers/serial/68360serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static void rs_360_start(struct tty_struct *tty)

static _INLINE_ void receive_chars(ser_info_t *info)
{
struct tty_struct *tty = info->tty;
struct tty_struct *tty = info->port.tty;
unsigned char ch, flag, *cp;
/*int ignored = 0;*/
int i;
Expand Down Expand Up @@ -514,7 +514,7 @@ static _INLINE_ void receive_chars(ser_info_t *info)

static _INLINE_ void receive_break(ser_info_t *info)
{
struct tty_struct *tty = info->tty;
struct tty_struct *tty = info->port.tty;

info->state->icount.brk++;
/* Check to see if there is room in the tty buffer for
Expand All @@ -528,7 +528,7 @@ static _INLINE_ void transmit_chars(ser_info_t *info)
{

if ((info->flags & TX_WAKEUP) ||
(info->tty->flags & (1 << TTY_DO_WRITE_WAKEUP))) {
(info->port.tty->flags & (1 << TTY_DO_WRITE_WAKEUP))) {
schedule_work(&info->tqueue);
}

Expand Down Expand Up @@ -584,12 +584,12 @@ static _INLINE_ void check_modem_status(struct async_struct *info)
}
}
if (info->flags & ASYNC_CTS_FLOW) {
if (info->tty->hw_stopped) {
if (info->port.tty->hw_stopped) {
if (status & UART_MSR_CTS) {
#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW))
printk("CTS tx start...");
#endif
info->tty->hw_stopped = 0;
info->port.tty->hw_stopped = 0;
info->IER |= UART_IER_THRI;
serial_out(info, UART_IER, info->IER);
rs_sched_event(info, RS_EVENT_WRITE_WAKEUP);
Expand All @@ -600,7 +600,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info)
#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW))
printk("CTS tx stop...");
#endif
info->tty->hw_stopped = 1;
info->port.tty->hw_stopped = 1;
info->IER &= ~UART_IER_THRI;
serial_out(info, UART_IER, info->IER);
}
Expand Down Expand Up @@ -670,7 +670,7 @@ static void do_softint(void *private_)
ser_info_t *info = (ser_info_t *) private_;
struct tty_struct *tty;

tty = info->tty;
tty = info->port.tty;
if (!tty)
return;

Expand All @@ -693,7 +693,7 @@ static void do_serial_hangup(void *private_)
struct async_struct *info = (struct async_struct *) private_;
struct tty_struct *tty;

tty = info->tty;
tty = info->port.tty;
if (!tty)
return;

Expand Down Expand Up @@ -721,8 +721,8 @@ static int startup(ser_info_t *info)

#ifdef maybe
if (!state->port || !state->type) {
if (info->tty)
set_bit(TTY_IO_ERROR, &info->tty->flags);
if (info->port.tty)
set_bit(TTY_IO_ERROR, &info->port.tty->flags);
goto errout;
}
#endif
Expand All @@ -734,12 +734,12 @@ static int startup(ser_info_t *info)

#ifdef modem_control
info->MCR = 0;
if (info->tty->termios->c_cflag & CBAUD)
if (info->port.tty->termios->c_cflag & CBAUD)
info->MCR = UART_MCR_DTR | UART_MCR_RTS;
#endif

if (info->tty)
clear_bit(TTY_IO_ERROR, &info->tty->flags);
if (info->port.tty)
clear_bit(TTY_IO_ERROR, &info->port.tty->flags);

/*
* and set the speed of the serial port
Expand Down Expand Up @@ -842,8 +842,8 @@ static void shutdown(ser_info_t *info)
smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
}

if (info->tty)
set_bit(TTY_IO_ERROR, &info->tty->flags);
if (info->port.tty)
set_bit(TTY_IO_ERROR, &info->port.tty->flags);

info->flags &= ~ASYNC_INITIALIZED;
local_irq_restore(flags);
Expand All @@ -863,9 +863,9 @@ static void change_speed(ser_info_t *info)
volatile struct smc_regs *smcp;
volatile struct scc_regs *sccp;

if (!info->tty || !info->tty->termios)
if (!info->port.tty || !info->port.tty->termios)
return;
cflag = info->tty->termios->c_cflag;
cflag = info->port.tty->termios->c_cflag;

state = info->state;

Expand Down Expand Up @@ -936,24 +936,24 @@ static void change_speed(ser_info_t *info)
* Set up parity check flag
*/
info->read_status_mask = (BD_SC_EMPTY | BD_SC_OV);
if (I_INPCK(info->tty))
if (I_INPCK(info->port.tty))
info->read_status_mask |= BD_SC_FR | BD_SC_PR;
if (I_BRKINT(info->tty) || I_PARMRK(info->tty))
if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty))
info->read_status_mask |= BD_SC_BR;

/*
* Characters to ignore
*/
info->ignore_status_mask = 0;
if (I_IGNPAR(info->tty))
if (I_IGNPAR(info->port.tty))
info->ignore_status_mask |= BD_SC_PR | BD_SC_FR;
if (I_IGNBRK(info->tty)) {
if (I_IGNBRK(info->port.tty)) {
info->ignore_status_mask |= BD_SC_BR;
/*
* If we're ignore parity and break indicators, ignore
* overruns too. (For real raw support).
*/
if (I_IGNPAR(info->tty))
if (I_IGNPAR(info->port.tty))
info->ignore_status_mask |= BD_SC_OV;
}
/*
Expand Down Expand Up @@ -1658,7 +1658,7 @@ static void rs_360_close(struct tty_struct *tty, struct file * filp)
tty_ldisc_flush(tty);
tty->closing = 0;
info->event = 0;
info->tty = 0;
info->port.tty = NULL;
if (info->blocked_open) {
if (info->close_delay) {
msleep_interruptible(jiffies_to_msecs(info->close_delay));
Expand Down Expand Up @@ -1758,7 +1758,7 @@ static void rs_360_hangup(struct tty_struct *tty)
info->event = 0;
state->count = 0;
info->flags &= ~ASYNC_NORMAL_ACTIVE;
info->tty = 0;
info->port.tty = NULL;
wake_up_interruptible(&info->open_wait);
}

Expand Down Expand Up @@ -1919,7 +1919,7 @@ static int rs_360_open(struct tty_struct *tty, struct file * filp)
printk("rs_open %s, count = %d\n", tty->name, info->state->count);
#endif
tty->driver_data = info;
info->tty = tty;
info->port.tty = tty;

/*
* Start up serial port
Expand Down Expand Up @@ -1976,7 +1976,7 @@ static inline int line_info(char *buf, struct serial_state *state)
info->port = state->port;
info->flags = state->flags;
info->quot = 0;
info->tty = 0;
info->port.tty = NULL;
}
local_irq_disable();
status = serial_in(info, UART_MSR);
Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/amba-pl010.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static void pl010_enable_ms(struct uart_port *port)

static void pl010_rx_chars(struct uart_amba_port *uap)
{
struct tty_struct *tty = uap->port.info->tty;
struct tty_struct *tty = uap->port.info->port.tty;
unsigned int status, ch, flag, rsr, max_count = 256;

status = readb(uap->port.membase + UART01x_FR);
Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void pl011_enable_ms(struct uart_port *port)

static void pl011_rx_chars(struct uart_amba_port *uap)
{
struct tty_struct *tty = uap->port.info->tty;
struct tty_struct *tty = uap->port.info->port.tty;
unsigned int status, ch, flag, max_count = 256;

status = readw(uap->port.membase + UART01x_FR);
Expand Down
10 changes: 5 additions & 5 deletions drivers/serial/bfin_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int kgdb_get_debug_char(void)
#ifdef CONFIG_SERIAL_BFIN_PIO
static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
{
struct tty_struct *tty = uart->port.info->tty;
struct tty_struct *tty = uart->port.info->port.tty;
unsigned int status, ch, flg;
static struct timeval anomaly_start = { .tv_sec = 0 };

Expand Down Expand Up @@ -393,7 +393,7 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)

static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
{
struct tty_struct *tty = uart->port.info->tty;
struct tty_struct *tty = uart->port.info->port.tty;
int i, flg, status;

status = UART_GET_LSR(uart);
Expand Down Expand Up @@ -552,7 +552,7 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
unsigned int status;
struct uart_info *info = uart->port.info;
struct tty_struct *tty = info->tty;
struct tty_struct *tty = info->port.tty;

status = bfin_serial_get_mctrl(&uart->port);
uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
Expand Down Expand Up @@ -814,10 +814,10 @@ static void bfin_serial_set_ldisc(struct uart_port *port)
int line = port->line;
unsigned short val;

if (line >= port->info->tty->driver->num)
if (line >= port->info->port.tty->driver->num)
return;

switch (port->info->tty->ldisc.num) {
switch (port->info->port.tty->ldisc.num) {
case N_IRDA:
val = UART_GET_GCTL(&bfin_serial_ports[line]);
val |= (IREN | RPOLC);
Expand Down
4 changes: 2 additions & 2 deletions drivers/serial/bfin_sport_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static int sport_uart_setup(struct sport_uart_port *up, int sclk, int baud_rate)
static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
{
struct sport_uart_port *up = dev_id;
struct tty_struct *tty = up->port.info->tty;
struct tty_struct *tty = up->port.info->port.tty;
unsigned int ch;

do {
Expand All @@ -201,7 +201,7 @@ static irqreturn_t sport_uart_tx_irq(int irq, void *dev_id)
static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
{
struct sport_uart_port *up = dev_id;
struct tty_struct *tty = up->port.info->tty;
struct tty_struct *tty = up->port.info->port.tty;
unsigned int stat = SPORT_GET_STAT(up);

/* Overflow in RX FIFO */
Expand Down
Loading

0 comments on commit a88487c

Please sign in to comment.