]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB: dummy-hcd: use dynamic allocation for platform_devices
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 7 Apr 2008 19:03:25 +0000 (15:03 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:49 +0000 (21:16 -0700)
commita89a2cd396b20c46a37fa8db4b652fb00f29d0a4
tree03f69864402c8a8c8a4faa81cfa347897b69c164
parent0e530b45783f75a29bde20bbf9e287c915a4f68b
USB: dummy-hcd: use dynamic allocation for platform_devices

This patch (as1075) changes dummy-hcd to dynamically allocate its
platform_device structures, using the core platform_device_alloc()
interface.  This is what it should have done all along, because the
dynamically-allocated structures have a release method in the driver
core and are therefore immune to being released after the module has
been unloaded.

Thanks to Richard Purdie for pointing out the need for this change.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/dummy_hcd.c