USB: isp1362-hcd, fix double lock
authorJiri Slaby <jslaby@suse.cz>
Mon, 21 Jun 2010 15:02:51 +0000 (17:02 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Jun 2010 15:16:06 +0000 (08:16 -0700)
commit1c815577823951ff082fe1201fdd5efec5e6e8ea
treec1778655d43eeca6b7dc140b32d2fcb033b50db3
parent9a49a14da4afe2c4ab7d7025a2f7f0f99a1c90e0
USB: isp1362-hcd, fix double lock

Stanse found that isp1362_sw_reset tries to take a isp1362_hcd->lock,
but it is already held in isp1362_hc_stop. Avoid that by introducing
__isp1362_sw_reset which doesn't take the lock and call it from
isp1362_hc_stop. isp1362_sw_reset is then as simple as lock --
__isp1362_sw_reset -- unlock.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Lothar Wassmann <LW@KARO-electronics.de>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/isp1362-hcd.c