linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the staging tree with the tty tree
@ 2012-09-13  6:14 Stephen Rothwell
  2012-09-13  6:59 ` Samuel Iglesias Gonsálvez
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2012-09-13  6:14 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-next, linux-kernel, Jiri Slaby, Jens Taprogge,
	Samuel Iglesias Gonsalvez

[-- Attachment #1: Type: text/plain, Size: 3463 bytes --]

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@canb.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) {

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2012-09-13  6:14 linux-next: manual merge of the staging tree with the tty tree Stephen Rothwell
@ 2012-09-13  6:59 ` Samuel Iglesias Gonsálvez
  2012-09-13  7:36   ` Stephen Rothwell
  0 siblings, 1 reply; 17+ messages in thread
From: Samuel Iglesias Gonsálvez @ 2012-09-13  6:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Greg KH, linux-next, linux-kernel, Jiri Slaby, Jens Taprogge

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

On Thu, 2012-09-13 at 16:14 +1000, Stephen Rothwell wrote:
> 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).
> 

Thanks Stephen.

I don't see tty_port_register_device in any header file in staging.

Is it defined in tty tree and it is not merged into staging tree?

Best regards,

Sam



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2012-09-13  6:59 ` Samuel Iglesias Gonsálvez
@ 2012-09-13  7:36   ` Stephen Rothwell
  0 siblings, 0 replies; 17+ messages in thread
From: Stephen Rothwell @ 2012-09-13  7:36 UTC (permalink / raw)
  To: Samuel Iglesias Gonsálvez
  Cc: Greg KH, linux-next, linux-kernel, Jiri Slaby, Jens Taprogge

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

Hi Samuel,

On Thu, 13 Sep 2012 08:59:25 +0200 Samuel Iglesias Gonsálvez <siglesias@igalia.com> wrote:
>
> On Thu, 2012-09-13 at 16:14 +1000, Stephen Rothwell wrote:
> > 
> > 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).
> 
> I don't see tty_port_register_device in any header file in staging.
> 
> Is it defined in tty tree and it is not merged into staging tree?

Yes, that is the case.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2022-10-04  6:33 Stephen Rothwell
@ 2022-10-04  8:26 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2022-10-04  8:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Ilpo Järvinen, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Oct 04, 2022 at 05:33:54PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the staging tree got a conflict in:
> 
>   drivers/staging/fwserial/fwserial.c
> 
> between commit:
> 
>   a8c11c152034 ("tty: Make ->set_termios() old ktermios const")
> 
> from the tty tree and commit:
> 
>   db65becab2a3 ("staging: fwserial: delete the driver.")
> 
> from the staging tree.
> 
> I fixed it up (I deleted the file) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.

Fix is correct, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2022-10-04  6:33 Stephen Rothwell
  2022-10-04  8:26 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2022-10-04  6:33 UTC (permalink / raw)
  To: Greg KH
  Cc: Greg Kroah-Hartman, Ilpo Järvinen,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

Hi all,

Today's linux-next merge of the staging tree got a conflict in:

  drivers/staging/fwserial/fwserial.c

between commit:

  a8c11c152034 ("tty: Make ->set_termios() old ktermios const")

from the tty tree and commit:

  db65becab2a3 ("staging: fwserial: delete the driver.")

from the staging tree.

I fixed it up (I deleted the file) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2017-06-05  4:57 Stephen Rothwell
@ 2017-06-05  6:50 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2017-06-05  6:50 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Okash Khawaja, Alan Cox

On Mon, Jun 05, 2017 at 02:57:49PM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the staging tree got a conflict in:
> 
>   include/uapi/linux/tty.h
> 
> between commit:
> 
>   8a8dabf2dd68 ("tty: handle the case where we cannot restore a line discipline")
> 
> from the tty tree and commit:
> 
>   1ab92da32e37 ("staging: speakup: add tty-based comms functions")
> 
> from the staging tree.
> 
> I fixed it up (I used the tty tree version) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.

I'm the maintainer of both, I knew this would happen and made it so it
was obvious what version to take :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2017-06-05  4:57 Stephen Rothwell
  2017-06-05  6:50 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2017-06-05  4:57 UTC (permalink / raw)
  To: Greg KH
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Okash Khawaja, Alan Cox

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in:

  include/uapi/linux/tty.h

between commit:

  8a8dabf2dd68 ("tty: handle the case where we cannot restore a line discipline")

from the tty tree and commit:

  1ab92da32e37 ("staging: speakup: add tty-based comms functions")

from the staging tree.

I fixed it up (I used the tty tree version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2016-02-01  3:51 Stephen Rothwell
@ 2016-02-01  4:01 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2016-02-01  4:01 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Peter Hurley, Shraddha Barke

On Mon, Feb 01, 2016 at 02:51:46PM +1100, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the staging tree got a conflict in:
> 
>   drivers/staging/dgap/dgap.c
> 
> between commits:
> 
>   6aa56785e735 ("staging: digi: Replace open-coded tty_wakeup()")
>   2d73b069f816 ("staging: dgap: Remove redundant write_wait wakeups")
>   9db276f8f021 ("tty: Use termios c_*flag macros")
> 
> from the tty tree and commit:
> 
>   7e3933df9874 ("Staging: dgap: Remove obsolete driver")
> 
> from the staging tree.
> 
> I fixed it up (I just removed the file) and can carry the fix as necessary
> (no action is required).

Thanks for this, that's the obviously correct fix.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2016-02-01  3:51 Stephen Rothwell
  2016-02-01  4:01 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2016-02-01  3:51 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Peter Hurley, Shraddha Barke

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in:

  drivers/staging/dgap/dgap.c

between commits:

  6aa56785e735 ("staging: digi: Replace open-coded tty_wakeup()")
  2d73b069f816 ("staging: dgap: Remove redundant write_wait wakeups")
  9db276f8f021 ("tty: Use termios c_*flag macros")

from the tty tree and commit:

  7e3933df9874 ("Staging: dgap: Remove obsolete driver")

from the staging tree.

I fixed it up (I just removed the file) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2012-11-29  4:47 Stephen Rothwell
@ 2012-11-29  5:17 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2012-11-29  5:17 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Peter Hurley

On Thu, Nov 29, 2012 at 03:47:39PM +1100, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the staging tree got a conflicts in
> drivers/staging/fwserial/fwserial.c, drivers/staging/Kconfig and
> drivers/staging/Kconfig between commit 7355ba3445f2 ("staging: fwserial:
> Add TTY-over-Firewire serial driver") from the tty tree and commit
> e5711071ad94 ("staging: fwserial: Add TTY-over-Firewire serial driver")
> from the staging tree.
> 
> I am not sure why this patch exists in both trees :-(

I needed to do that to handle the tty driver changes that were required
for it due to the tty layer changes.

> I fixed it up (they are the same but the trees contain more commits
> affecting these files) and can carry the fix as necessary (no action is
> required).

The tty tree will end up having the "correct" one here, thanks for
resolving this in your tree.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2012-11-29  4:47 Stephen Rothwell
  2012-11-29  5:17 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2012-11-29  4:47 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Peter Hurley

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

Hi Greg,

Today's linux-next merge of the staging tree got a conflicts in
drivers/staging/fwserial/fwserial.c, drivers/staging/Kconfig and
drivers/staging/Kconfig between commit 7355ba3445f2 ("staging: fwserial:
Add TTY-over-Firewire serial driver") from the tty tree and commit
e5711071ad94 ("staging: fwserial: Add TTY-over-Firewire serial driver")
from the staging tree.

I am not sure why this patch exists in both trees :-(

I fixed it up (they are the same but the trees contain more commits
affecting these files) and can carry the fix as necessary (no action is
required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2012-11-28  5:14 Stephen Rothwell
@ 2012-11-28 16:47 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2012-11-28 16:47 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Bill Pemberton, Kumar Amit Mehta

On Wed, Nov 28, 2012 at 04:14:30PM +1100, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the staging tree got a conflict in
> drivers/staging/dgrp/dgrp_tty.c between commit 3ba89e96610b ("staging:
> dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp
> driver") from the tty tree and commit 8fdefcb0ab74 ("staging: dgrp:
> remove TIOCGSOFTCAR and TIOCSSOFTCAR handling") from the staging tree.
> 
> I fixed it up (using the staging tree version - since it is a superset of
> the tty tree version) and can carry the fix as necessary (no action is
> required).

That is correct, thanks for doing this.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2012-11-28  5:14 Stephen Rothwell
  2012-11-28 16:47 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2012-11-28  5:14 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Bill Pemberton, Kumar Amit Mehta

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/staging/dgrp/dgrp_tty.c between commit 3ba89e96610b ("staging:
dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp
driver") from the tty tree and commit 8fdefcb0ab74 ("staging: dgrp:
remove TIOCGSOFTCAR and TIOCSSOFTCAR handling") from the staging tree.

I fixed it up (using the staging tree version - since it is a superset of
the tty tree version) and can carry the fix as necessary (no action is
required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2012-09-17  7:37 Stephen Rothwell
@ 2012-09-17 11:20 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2012-09-17 11:20 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Jiri Slaby, Samuel Iglesias Gonsalvez

On Mon, Sep 17, 2012 at 05:37:06PM +1000, Stephen Rothwell wrote:
> 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).

Looks good to me, thanks for this.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2012-09-17  7:37 Stephen Rothwell
  2012-09-17 11:20 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2012-09-17  7:37 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Jiri Slaby, Samuel Iglesias Gonsalvez

[-- Attachment #1: Type: text/plain, Size: 3416 bytes --]

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@canb.auug.org.au

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 #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the staging tree with the tty tree
  2012-05-07  5:58 Stephen Rothwell
@ 2012-05-07 14:48 ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2012-05-07 14:48 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Alan Cox, Paul Gortmaker

On Mon, May 07, 2012 at 03:58:31PM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the staging tree got a conflict in
> drivers/staging/serial/68360serial.c between commit d29f3ef39be4
> ("tty_lock: Localise the lock") from the tty tree and commit 60e6d2689c2a
> ("staging: evict abandoned 68360serial.c driver from the kernel") from
> the staging tree.
> 
> The latter removed the file, so I did that.

That sounds correct, thanks for doing it.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the staging tree with the tty tree
@ 2012-05-07  5:58 Stephen Rothwell
  2012-05-07 14:48 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2012-05-07  5:58 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Alan Cox, Paul Gortmaker

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/staging/serial/68360serial.c between commit d29f3ef39be4
("tty_lock: Localise the lock") from the tty tree and commit 60e6d2689c2a
("staging: evict abandoned 68360serial.c driver from the kernel") from
the staging tree.

The latter removed the file, so I did that.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-10-04  8:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13  6:14 linux-next: manual merge of the staging tree with the tty tree Stephen Rothwell
2012-09-13  6:59 ` Samuel Iglesias Gonsálvez
2012-09-13  7:36   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2022-10-04  6:33 Stephen Rothwell
2022-10-04  8:26 ` Greg KH
2017-06-05  4:57 Stephen Rothwell
2017-06-05  6:50 ` Greg KH
2016-02-01  3:51 Stephen Rothwell
2016-02-01  4:01 ` Greg KH
2012-11-29  4:47 Stephen Rothwell
2012-11-29  5:17 ` Greg KH
2012-11-28  5:14 Stephen Rothwell
2012-11-28 16:47 ` Greg KH
2012-09-17  7:37 Stephen Rothwell
2012-09-17 11:20 ` Greg KH
2012-05-07  5:58 Stephen Rothwell
2012-05-07 14:48 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).