From: Mathias Nyman Date: Tue, 3 Jan 2017 16:28:43 +0000 (+0200) Subject: xhci: free xhci virtual devices with leaf nodes first X-Git-Tag: v3.2.87~138 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fcebcb8922e2307b4289cf2cdab3fac49d3cec4;p=pandora-kernel.git xhci: free xhci virtual devices with leaf nodes first commit ee8665e28e8d90ce69d4abe5a469c14a8707ae0e upstream. the tt_info provided by a HS hub might be in use to by a child device Make sure we free the devices in the correct order. This is needed in special cases such as when xhci controller is reset when resuming from hibernate, and all virt_devices are freed. Also free the virt_devices starting from max slot_id as children more commonly have higher slot_id than parent. Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed