]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_printer: actually limit the number of instances
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Fri, 24 Jul 2015 07:48:41 +0000 (09:48 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 27 Jul 2015 15:19:50 +0000 (10:19 -0500)
commit63835a6167c25933144f96ea3df3b7dace221b88
tree17c3be3e9f9375fd83220d27c1cbed9e730276b4
parentcfe90c8f9d88f739b26e4eccbea1b45dc4a3e20f
usb: gadget: f_printer: actually limit the number of instances

There is a predefined maximum number of printer instances, currently 4.
A chrdev region is allocated accordingly, but with configfs the user
can create as many printer function directories as they like. To make the
number of printer  instances consistent with the number of allocated
minors, the limit is enforced at directory creation time.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_printer.c