From 57d074b2ef793e6bb99135566edf5778e4efd8e5 Mon Sep 17 00:00:00 2001
From: Antonino Daplas <adaplas@hotpop.com>
Date: Fri, 14 Jan 2005 23:44:21 -0800
Subject: [PATCH] [PATCH] sa1100fb: Reorder add_wait_queue() and
 set_current_state()

Reorder add_wait_queue() and set_current_state() as a signal could be lost in
between the two functions.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
 drivers/video/sa1100fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index f892ee8e8695..6439fb073158 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1072,8 +1072,8 @@ static void sa1100fb_disable_controller(struct sa1100fb_info *fbi)
 		GPCR |= SHANNON_GPIO_DISP_EN;
 	}	
 
-	add_wait_queue(&fbi->ctrlr_wait, &wait);
 	set_current_state(TASK_UNINTERRUPTIBLE);
+	add_wait_queue(&fbi->ctrlr_wait, &wait);
 
 	LCSR = 0xffffffff;	/* Clear LCD Status Register */
 	LCCR0 &= ~LCCR0_LDM;	/* Enable LCD Disable Done Interrupt */
-- 
2.30.9