From: Alan Stern Date: Fri, 7 May 2010 14:41:10 +0000 (-0400) Subject: HID: fix suspend crash by moving initializations earlier X-Git-Tag: v2.6.34~56^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde4e2f73208b8f34f123791e39c0cb6bc74b32a;p=pandora-kernel.git HID: fix suspend crash by moving initializations earlier Although the usbhid driver allocates its usbhid structure in the probe routine, several critical fields in that structure don't get initialized until usbhid_start(). However if report descriptor parsing fails then usbhid_start() is never called. This leads to problems during system suspend -- the system will freeze. This patch (as1378) fixes the bug by moving the initialization statements up into usbhid_probe(). Signed-off-by: Alan Stern Reported-by: Bruno Prémont Tested-By: Bruno Prémont Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed