Re: [PATCH 1/2] tty_io: add an API to get device corresponding totty_struct

From: Alan Cox
Date: Sat Aug 07 2010 - 07:19:41 EST

On Sat, 7 Aug 2010 13:55:02 +0400
Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx> wrote:

> Some device drivers (mostly tty line disciplines) would like to have way
> to get a struct device instancve corresponding to passed tty_struct. Add
> respective API call.

Most of the kernel simply keeps a parent device pointer in the struct. If
we have a lookup method then we'll simply end up with a struct device in
each tty ldisc struct instead, and it will be harder to clean up later.

I think I'd much rather see this set when the tty is created and always
available. That would also let the whole tty layer use dev_err() and
friends usefully ?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at