]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 6146/1: sa1111: Prevent deadlock in resume path
authorMarek Vašut <marek.vasut@gmail.com>
Wed, 26 May 2010 22:53:09 +0000 (23:53 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:34 +0000 (11:22 -0700)
commitf4faf6a2dfda56e75b5949a437bc30a92ab6272a
treef4c1a1d0332243d5fa7a4c84abfb5ba347d6e4e1
parent2334682accfd74ed34841ecafcd9c39051293904
ARM: 6146/1: sa1111: Prevent deadlock in resume path

commit 3defb2476166445982a90c12d33f8947e75476c4 upstream.

This patch reorganises the sa1111_resume() function in a manner the spinlock
happens after calling the sa1111_wake(). This fixes two bugs:

1) This function called sa1111_wake() which tried to claim the same spinlock
   the sa1111_resume() already claimed. This would result in certain deadlock.

   Original idea for this part: Russell King <rmk+kernel@arm.linux.org.uk>

2) The function didn't unlock the spinlock in case the chip didn't report
   correct ID.

   Original idea for this part: Julia Lawall <julia@diku.dk>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/arm/common/sa1111.c