OSDN Git Service

USB: gadget: f_printer: set a default q_len
authorMichael R Sweet <msweet@msweet.org>
Mon, 28 Dec 2020 17:18:24 +0000 (12:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Jan 2021 15:49:08 +0000 (16:49 +0100)
commited054e4e95d6cb0582f1283707ddb40f18d14bfb
tree9508f0387b914018fa2ea1cd39b82fb397554f30
parent7c9a2598463a7803629a90e9e425af7ed241ec65
USB: gadget: f_printer: set a default q_len

The usb_f_printer gadget driver uses a default q_len value of *0* which prevents
any IO from occurring.  Moreover, once the driver is instantiated it is
impossible to change the q_len value.

The following patch uses a default q_len value of 10 which matches the legacy
g_printer gadget driver.  This minimizes the possibility that you end up with a
non-working printer gadget.  It is still possible to set the q_len to a
different value using the configfs path of the same name.

Signed-off-by: Michael R Sweet <msweet@msweet.org>
Link: https://lore.kernel.org/r/9DFB1605-63A5-46DB-A5A4-B59B315D8115@msweet.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_printer.c