Re: [PATCH 06/11] pps: serial clients support.

From: Alan Cox
Date: Thu Dec 03 2009 - 06:46:03 EST


> > I think putting the pps ldisc (which is basically n_tty and a bit) into
> > n_tty is probably the right choice given how small and clean it is - what
> > do you think ?
>
> I think it could be ok, but in this case where should I register
> pps-ldisc? Into tty_ldisc_begin just after tty_ldisc_N_TTY?

Yes.

> Again, should I remove the possibility to compile pps-ldisc as module?

It would do that yes. I hadn't considered that aspect of it - and that in
turn would force you to compile the core PPS support in to get pps-ldisc.

How about this then (I'm trying to see a way to avoid all thsoe exports
of functions)

/**
* n_tty_inherit_ops - initialise ldisc ops
* @ops: ops to initialise
*
* Allow a line discipline to inherit the basic operations
* from the n_tty line discipline. The caller must set up
* its own ldisc number, flags and name. It must use the
* inherited value of magic.
*/

void n_tty_init_ops(struct tty_ldisc_ops *ops)
{
*ops = tty_ldisc_N_TTY;
ops->owner = NULL:
ops->refcount = ops->flags = 0;
}
EXPORT_SYMBOL_GPL(n_tty_inherit_ops);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/