Hi Greg, Today's linux-next merge of the staging tree got a conflict in drivers/staging/ipack/devices/ipoctal.c between commit 734cc1783816 ("TTY: use tty_port_register_device") from the tty tree and commit d04600679ba0 ("Staging: ipack/devices/ipoctal: simplify ipoctal_write_tty ()") from the staging tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx diff --cc drivers/staging/ipack/devices/ipoctal.c index a68d981,2cdbf28..0000000 --- a/drivers/staging/ipack/devices/ipoctal.c +++ b/drivers/staging/ipack/devices/ipoctal.c @@@ -490,19 -429,26 +429,26 @@@ static int ipoctal_inst_slot(struct ipo ipoctal->tty_drv = tty; for (i = 0; i < NR_CHANNELS; i++) { - tty_port_init(&ipoctal->tty_port[i]); - tty_port_alloc_xmit_buf(&ipoctal->tty_port[i]); - ipoctal->tty_port[i].ops = &ipoctal_tty_port_ops; - - ipoctal_reset_stats(&ipoctal->chan_stats[i]); - ipoctal->nb_bytes[i] = 0; - init_waitqueue_head(&ipoctal->queue[i]); - - spin_lock_init(&ipoctal->lock[i]); - ipoctal->pointer_read[i] = 0; - ipoctal->pointer_write[i] = 0; - ipoctal->nb_bytes[i] = 0; - tty_port_register_device(&ipoctal->tty_port[i], tty, i, NULL); + struct device *tty_dev; + + channel = &ipoctal->channel[i]; + tty_port_init(&channel->tty_port); + tty_port_alloc_xmit_buf(&channel->tty_port); + channel->tty_port.ops = &ipoctal_tty_port_ops; + + ipoctal_reset_stats(&channel->stats); + channel->nb_bytes = 0; + init_waitqueue_head(&channel->queue); + + spin_lock_init(&channel->lock); + channel->pointer_read = 0; + channel->pointer_write = 0; - tty_dev = tty_register_device(tty, i, NULL); ++ tty_dev = tty_port_register_device(&channel->tty_port, tty, i, NULL); + if (IS_ERR(tty_dev)) { + dev_err(&ipoctal->dev->dev, "Failed to register tty device.\n"); + continue; + } + dev_set_drvdata(tty_dev, channel); /* * Enable again the RX. TX will be enabled when @@@ -613,23 -540,17 +540,17 @@@ static void ipoctal_set_termios(struct unsigned char mr1 = 0; unsigned char mr2 = 0; unsigned char csr = 0; - unsigned int channel = tty->index; - struct ipoctal *ipoctal = tty->driver_data; + struct ipoctal_channel *channel = tty->driver_data; speed_t baud; - cflag = tty->termios->c_cflag; + cflag = tty->termios.c_cflag; /* Disable and reset everything before change the setup */ - ipoctal_write_io_reg(ipoctal, &ipoctal->chan_regs[channel].u.w.cr, - CR_DISABLE_RX | CR_DISABLE_TX); - ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr, - CR_CMD_RESET_RX); - ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr, - CR_CMD_RESET_TX); - ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr, - CR_CMD_RESET_ERR_STATUS); - ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr, - CR_CMD_RESET_MR); + iowrite8(CR_DISABLE_RX | CR_DISABLE_TX, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_RX, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_TX, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_ERR_STATUS, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_MR, &channel->regs->w.cr); /* Set Bits per chars */ switch (cflag & CSIZE) {
Attachment:
pgponkeCtBayj.pgp
Description: PGP signature