linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Warning about not setting tty->port: what to set it to?
@ 2013-01-11 20:34 Grant Edwards
  2013-01-14 16:51 ` Grant Edwards
  0 siblings, 1 reply; 2+ messages in thread
From: Grant Edwards @ 2013-01-11 20:34 UTC (permalink / raw)
  To: linux-serial

I maintain a serial card driver which, starting with kernel 3.7,
produces this warning when a port is opened:

 tty_init_dev: ttyXYZ driver does not set tty->port. This will crash the kernel later. Fix the driver!

The driver still seems to work fine, but apparently I shouldn't expect
it to continue to do so.  

What am I supposed to set tty->port _to_ ?

Obviously, it's supposed to point to an instance of the type (struct tty_port).

Is there somewhere in particular I'm supposed to get that structure
instance from?

Am I supposed to allocate/clear one when the port is opened and free
it when the port is closed?  Or does the contents the structure
pointed to by tty->port need to be preserved?

Am I expected to do anything with the contents of that structure?

Or am I just providing some storage space for use by the tty layer
code?

-- 
Grant Edwards               grant.b.edwards        Yow! I'm young ... I'm
                                  at               HEALTHY ... I can HIKE
                              gmail.com            THRU CAPT GROGAN'S LUMBAR
                                                   REGIONS!


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

end of thread, other threads:[~2013-01-14 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 20:34 Warning about not setting tty->port: what to set it to? Grant Edwards
2013-01-14 16:51 ` Grant Edwards

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).