
From: "Luis R. Rodriguez" <mcgrof@studorgs.rutgers.edu>

2004-04-20	Aurelien Alleaume <slts@free.fr>

- prismcompat.h, prismcompat24.h: splitted PRISM_DEFWAITQ into
  PRISM_DEFWAITQ and PRISM_PREPWAITQ for islpci_mgt_transaction
  (islpci_mgt.c).  Adapted related code (islpci_mgt.c, islpci_dev.c).

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/net/wireless/prism54/islpci_dev.c    |    5 +++--
 25-akpm/drivers/net/wireless/prism54/islpci_mgt.c    |    5 +++--
 25-akpm/drivers/net/wireless/prism54/prismcompat.h   |    5 +++--
 25-akpm/drivers/net/wireless/prism54/prismcompat24.h |    4 ++--
 4 files changed, 11 insertions(+), 8 deletions(-)

diff -puN drivers/net/wireless/prism54/islpci_dev.c~prism54-touched-up-kernel-compatibility drivers/net/wireless/prism54/islpci_dev.c
--- 25/drivers/net/wireless/prism54/islpci_dev.c~prism54-touched-up-kernel-compatibility	Wed May 26 16:17:15 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_dev.c	Wed May 26 16:17:15 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.c,v 1.75 2004/04/17 08:46:04 ajfa Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.c,v 1.76 2004/04/19 18:33:45 ajfa Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
@@ -348,7 +348,8 @@ islpci_reset_if(islpci_private *priv)
 	int result = -ETIME;
 	int count;
 
-	PRISM_DEFWAITQ(priv->reset_done, wait);
+	PRISM_DEFWAITQ(wait);
+	PRISM_PREPWAITQ(priv->reset_done, wait);
 	
 	/* now the last step is to reset the interface */
 	isl38xx_interface_reset(priv->device_base, priv->device_host_address);
diff -puN drivers/net/wireless/prism54/islpci_mgt.c~prism54-touched-up-kernel-compatibility drivers/net/wireless/prism54/islpci_mgt.c
--- 25/drivers/net/wireless/prism54/islpci_mgt.c~prism54-touched-up-kernel-compatibility	Wed May 26 16:17:15 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_mgt.c	Wed May 26 16:17:15 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.c,v 1.45 2004/04/10 03:16:55 msw Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.c,v 1.46 2004/04/19 18:33:45 ajfa Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright 2004 Jens Maurer <Jens.Maurer@gmx.net>
@@ -456,11 +456,12 @@ islpci_mgt_transaction(struct net_device
 	const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000;
 	long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies;
 	int err;
+	PRISM_DEFWAITQ(wait);
 
 	if (down_interruptible(&priv->mgmt_sem))
 		return -ERESTARTSYS;
 
-	PRISM_DEFWAITQ(priv->mgmt_wqueue, wait);
+	PRISM_PREPWAITQ(priv->mgmt_wqueue, wait);
 	err = islpci_mgt_transmit(ndev, operation, oid, senddata, sendlen);
 	if (err)
 		goto out;
diff -puN drivers/net/wireless/prism54/prismcompat24.h~prism54-touched-up-kernel-compatibility drivers/net/wireless/prism54/prismcompat24.h
--- 25/drivers/net/wireless/prism54/prismcompat24.h~prism54-touched-up-kernel-compatibility	Wed May 26 16:17:15 2004
+++ 25-akpm/drivers/net/wireless/prism54/prismcompat24.h	Wed May 26 16:17:15 2004
@@ -55,8 +55,8 @@
 
 #define prism54_synchronize_irq(irq) synchronize_irq()
 
-#define PRISM_DEFWAITQ(x, y)	DECLARE_WAITQUEUE(y, current); \
-	set_current_state(TASK_UNINTERRUPTIBLE); \
+#define PRISM_DEFWAITQ(y)	DECLARE_WAITQUEUE(y, current)
+#define PRISM_PREPWAITQ(x, y)	set_current_state(TASK_UNINTERRUPTIBLE); \
 	add_wait_queue(&(x), &(y))
 
 #define PRISM_ENDWAITQ(x, y)	remove_wait_queue(&(x), &(y)); \
diff -puN drivers/net/wireless/prism54/prismcompat.h~prism54-touched-up-kernel-compatibility drivers/net/wireless/prism54/prismcompat.h
--- 25/drivers/net/wireless/prism54/prismcompat.h~prism54-touched-up-kernel-compatibility	Wed May 26 16:17:15 2004
+++ 25-akpm/drivers/net/wireless/prism54/prismcompat.h	Wed May 26 16:17:15 2004
@@ -39,8 +39,9 @@
 
 #define prism54_synchronize_irq(irq) synchronize_irq(irq)
 
-#define PRISM_DEFWAITQ(x, y)	DEFINE_WAIT(y); \
-	prepare_to_wait(&(x), &(y), TASK_UNINTERRUPTIBLE)
+#define PRISM_DEFWAITQ(y)	DEFINE_WAIT(y)
+
+#define PRISM_PREPWAITQ(x, y)	prepare_to_wait(&(x), &(y), TASK_UNINTERRUPTIBLE)
 
 #define PRISM_ENDWAITQ(x, y)	finish_wait(&(x), &(y))
 
_
