From: Andrzej Pietrasiewicz Date: Tue, 3 Mar 2015 09:52:26 +0000 (+0100) Subject: usb: gadget: printer: allocate printer_dev instances dynamically X-Git-Tag: omap-for-v4.1/fixes-rc1~167^2~55^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dd8c2e69521ec9d7b23a741294702f844353f1a;p=pandora-kernel.git usb: gadget: printer: allocate printer_dev instances dynamically With all the obstacles removed it is possible to allow more than one instance of the printer function. Since the function requires allocating character device region, a maximum number of allowed instances is defined. Such an approach is used in f_acm and in f_hid. With multiple instances it does not make sense to depend on a lock_printer_io member of a dynamically allocated (and destroyed) struct printer_dev to clean up after all instances of the printer function. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed