summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7188dc2)
* instead of line, use tty->index or iterator...
* irq and type are left unset. So get rid of them.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ------------------------------------------------------------
*/
* ------------------------------------------------------------
*/
-static int get_serial_info(struct serial_state *state,
+static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
struct serial_struct __user * retinfo)
{
struct serial_struct tmp;
struct serial_struct __user * retinfo)
{
struct serial_struct tmp;
return -EFAULT;
memset(&tmp, 0, sizeof(tmp));
tty_lock();
return -EFAULT;
memset(&tmp, 0, sizeof(tmp));
tty_lock();
- tmp.type = state->type;
- tmp.line = state->line;
tmp.flags = state->tport.flags;
tmp.xmit_fifo_size = state->xmit_fifo_size;
tmp.baud_base = state->baud_base;
tmp.flags = state->tport.flags;
tmp.xmit_fifo_size = state->xmit_fifo_size;
tmp.baud_base = state->baud_base;
tty_lock();
change_spd = ((new_serial.flags ^ port->flags) & ASYNC_SPD_MASK) ||
new_serial.custom_divisor != state->custom_divisor;
tty_lock();
change_spd = ((new_serial.flags ^ port->flags) & ASYNC_SPD_MASK) ||
new_serial.custom_divisor != state->custom_divisor;
- if (new_serial.irq != state->irq || new_serial.port != state->port ||
+ if (new_serial.irq || new_serial.port != state->port ||
new_serial.xmit_fifo_size != state->xmit_fifo_size) {
tty_unlock();
return -EINVAL;
new_serial.xmit_fifo_size != state->xmit_fifo_size) {
tty_unlock();
return -EINVAL;
switch (cmd) {
case TIOCGSERIAL:
switch (cmd) {
case TIOCGSERIAL:
- return get_serial_info(info, argp);
+ return get_serial_info(tty, info, argp);
case TIOCSSERIAL:
return set_serial_info(tty, info, argp);
case TIOCSERCONFIG:
case TIOCSSERIAL:
return set_serial_info(tty, info, argp);
case TIOCSERCONFIG:
}
if (--port->count < 0) {
printk("rs_close: bad serial port count for ttys%d: %d\n",
}
if (--port->count < 0) {
printk("rs_close: bad serial port count for ttys%d: %d\n",
- state->line, port->count);
+ tty->index, port->count);
port->count = 0;
}
if (port->count) {
port->count = 0;
}
if (port->count) {
* /proc fs routines....
*/
* /proc fs routines....
*/
-static inline void line_info(struct seq_file *m, struct serial_state *state)
+static inline void line_info(struct seq_file *m, int line,
+ struct serial_state *state)
{
char stat_buf[30], control, status;
unsigned long flags;
{
char stat_buf[30], control, status;
unsigned long flags;
- seq_printf(m, "%d: uart:amiga_builtin",state->line);
+ seq_printf(m, "%d: uart:amiga_builtin", line);
local_irq_save(flags);
status = ciab.pra;
local_irq_save(flags);
status = ciab.pra;
static int rs_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "serinfo:1.0 driver:%s\n", serial_version);
static int rs_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "serinfo:1.0 driver:%s\n", serial_version);
- line_info(m, &rs_table[0]);
+ line_info(m, 0, &rs_table[0]);
state = rs_table;
state->port = (int)&custom.serdatr; /* Just to give it a value */
state = rs_table;
state->port = (int)&custom.serdatr; /* Just to give it a value */
state->custom_divisor = 0;
state->icount.cts = state->icount.dsr =
state->icount.rng = state->icount.dcd = 0;
state->custom_divisor = 0;
state->icount.cts = state->icount.dsr =
state->icount.rng = state->icount.dcd = 0;
state->icount.overrun = state->icount.brk = 0;
tty_port_init(&state->tport);
state->icount.overrun = state->icount.brk = 0;
tty_port_init(&state->tport);
- printk(KERN_INFO "ttyS%d is the amiga builtin serial port\n",
- state->line);
+ printk(KERN_INFO "ttyS0 is the amiga builtin serial port\n");
struct serial_state {
int baud_base;
unsigned long port;
struct serial_state {
int baud_base;
unsigned long port;
- int irq;
- int type;
- int line;
int xmit_fifo_size;
int custom_divisor;
struct async_icount icount;
int xmit_fifo_size;
int custom_divisor;
struct async_icount icount;