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

From: Rodolfo Giometti
Date: Thu Dec 03 2009 - 07:05:32 EST


On Thu, Dec 03, 2009 at 11:46:41AM +0000, Alan Cox wrote:

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

The problem is that I have to do some operations into ldisc's open and
close methods (see linux/drivers/pps/clients/pps-ldisc.c).

By using your solution I inherit such methods but I cannot modify
their behaviour in a manner suitable for register/deregister PPS
support at runtime.

Ciao,

Rodolfo

--

GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver giometti@xxxxxxxx
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
--
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/