[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120913161417.e863926832ccf8a2e1ca1f2a@canb.auug.org.au>
Date: Thu, 13 Sep 2012 16:14:17 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Greg KH <greg@...ah.com>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jslaby@...e.cz>,
Jens Taprogge <jens.taprogge@...rogge.org>,
Samuel Iglesias Gonsalvez <siglesias@...lia.com>
Subject: linux-next: manual merge of the staging tree with the tty tree
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
2afb41d9d30d ("Staging: ipack/devices/ipoctal: Check tty_register_device
return value") from the staging tree.
I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc drivers/staging/ipack/devices/ipoctal.c
index a68d981,0292364..0000000
--- a/drivers/staging/ipack/devices/ipoctal.c
+++ b/drivers/staging/ipack/devices/ipoctal.c
@@@ -490,19 -417,27 +417,27 @@@ 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;
+ channel->nb_bytes = 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 -529,17 +529,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) {
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists