From: Sebastian Andrzej Siewior Date: Mon, 29 Oct 2012 17:09:56 +0000 (+0100) Subject: usb: gadget: dummy_hcd: remove global the_controller variable X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~82^2~59^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b100a2f34dc160502bf7d3006cd8294303bbfacb;p=pandora-kernel.git usb: gadget: dummy_hcd: remove global the_controller variable The one thing that makes two UDCs+HCDs impossible is the global the_controller variable. This patch changes this. After device allocation we allocate the "the_controller" variable and pass it as platform_data to the UDC and its companion. We can have now multiple instances dummy hcd and therefore I change the limit from one to two. I was able to test this with g_ncm adn g_zero: |# lsusb |Bus 001 Device 002: ID 0525:a4a0 Netchip Technology, Inc. Linux-USB "Gadget Zero" |Bus 002 Device 002: ID 0525:a4a1 Netchip Technology, Inc. Linux-USB Ethernet Gadget |Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub I was able to start testusb -a and ifconfig usb[01] up with no complains. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed