> > + for (i = 0; i < len; i++) { > > + obuf[i] = (u8)xmit->buf[xmit->tail] | WD_TAG; > > + xmit->tail = (xmit->tail + 1) & > > + (UART_XMIT_SIZE - 1); > > Could this driver use include/linux/kfifo.h, rather than open-coding it?
The circ buffer stuff comes from the serial layer. The whole serial layer wants switching to kfifo (as and when we know why the kfifo changes seem to have broken USB serial) but the driver can't do that itself and use the serial core code until then. (Actually most of the serial_core code wants a rewrite but having had a couple of goes at doing it I've not figured out any way to do it without simply breaking all sorts of embedded platform serial drivers that need specific hardware to fix). > > + } > > + max3110_write_then_read(max, (u8 *)obuf, > > + (u8 *)ibuf, len * 2, 0); > > Error codes are ignored. The drivers/serial midlayer has no provision for reporting them. Alan ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general