static int sa1100_startup(struct uart_port *port) { struct sa1100_port *sport = (struct sa1100_port *)port; int retval; /* * Allocate the IRQ */ retval = request_irq(sport->port.irq, sa1100_int, 0, "sa11x0-uart", sport); if (retval) return retval; /* * If there is a specific "open" function * (to register control line interrupts) */ if (sa1100_open) { retval = sa1100_open(port); if (retval) { free_irq(sport->port.irq, sport); return retval; } } /* * Finally, clear and enable interrupts */ UART_PUT_UTSR0(sport, -1); UART_PUT_UTCR3(sport, UTCR3_RXE | UTCR3_TXE | UTCR3_RIE); return 0; }
static int sa1100_startup(struct uart_port *port, struct uart_info *info) { int retval; /* * Allocate the IRQ */ retval = request_irq(port->irq, sa1100_int, 0, "serial_sa1100", info); if (retval) return retval; /* * If there is a specific "open" function (to register * control line interrupts) */ if (sa1100_open) { retval = sa1100_open(port, info); if (retval) { free_irq(port->irq, info); return retval; } } /* * Finally, clear and enable interrupts */ UART_PUT_UTSR0(port, -1); UART_PUT_UTCR3(port, UTCR3_RXE | UTCR3_TXE | UTCR3_RIE); return 0; }