On Sat, 2012-10-13 at 17:33 +0200, Johan Hovold wrote:
> Thanks for the patch Jarkko. Your solution is nice, but I think it could
> implemented in a slightly better way.
> 
> For starters, the subdrivers really shouldn't be poking around in the
> generic driver's implementation details unless really necessary. Rather
> we should export the generic chars_in_buffer so that other drivers may
> implement similar functionality, should their protocols support it.
> 
> Secondly, you're more or less copying the tiocmget implementation rather
> then reusing the current implementation (with buffer allocation and
> device-dependent status-format handling).
> 
> Finally, there's a small optimisation that could be made from only
> checking the hardware buffers when we now that the software buffers are
> actually empty (rather than unconditionally submitting the control urb).

Hello Johan,

I'm not a regular kernel hacker, but your modifications look good to me.
Less code duplication is better. I was actually surprised that I
couldn't call the generic chars_in_buffer function in the driver.

Kind regards,
Jarkko

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to