Re: [PATCH] usb: gadget: f_acm: make bInterfaceProtocol configurable

From: Greg Kroah-Hartman
Date: Wed Jul 31 2024 - 04:32:51 EST


On Tue, Jul 30, 2024 at 09:43:37PM +0200, Michael Walle wrote:
> struct f_serial_opts {
> struct usb_function_instance func_inst;
> u8 port_num;
> + u8 protocol;
> +
> + struct mutex lock;
> + int refcnt;

Attempting to "roll your own" reference count is almost never a good
idea. If you really need one, please use the proper in-kernel apis for
this. But you need to justify it as well, I didn't see why this was
needed at all.

thanks,

greg k-h