On Sat, Oct 06, 2012 at 04:49:56PM +0100, Alan Cox wrote: > On Sat, 06 Oct 2012 13:45:47 +0100 > Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> wrote: > > > This allows drivers (such as OMAP serial) to allocate and free their > > transmit buffers in a sane manner, rather than working around the > > buffer allocation provided by serial_core. > > I think this just illustrates how broken the serial_core layering is in > that drivers can't treat it as a library but get constrained by it. > > Fine for now and actually probably a useful hook to begin removing the > circ buffers for the kernel generic kfifo and other work that needs doing > eventually. Yes, I was thinking about turning the 'default' buffer allocation into a library call which drivers would set, but I felt that's just asking for a big patch and problems with new drivers appearing. We could transition it by providing a default buffer allocation call, converting all the drivers, and then making that call mandatory. That probably would then give us a better path to convert to kfifo. The view that serial_core should be a library is one that Ted mentioned when I created serial_core originally - I disagreed at the time, and I still believe it would've ended up being much more complex - and hairy - to go that route at that time. Maybe as things have moved forward in the tty layer that's changed, but I've been out of tty stuff for too long to properly comment. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html