patch-2.3.1 linux/drivers/block/md.c

Next file: linux/drivers/block/nbd.c
Previous file: linux/drivers/block/macide.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -817,12 +817,12 @@
 	struct md_thread *thread = (struct md_thread *)
 		kmalloc(sizeof(struct md_thread), GFP_KERNEL);
 	int ret;
-	struct semaphore sem = MUTEX_LOCKED;
+	DECLARE_MUTEX_LOCKED(sem);
 	
 	if (!thread) return NULL;
 	
 	memset(thread, 0, sizeof(struct md_thread));
-	init_waitqueue(&thread->wqueue);
+	init_waitqueue_head(&thread->wqueue);
 	
 	thread->sem = &sem;
 	thread->run = run;
@@ -838,7 +838,7 @@
 
 void md_unregister_thread (struct md_thread *thread)
 {
-	struct semaphore sem = MUTEX_LOCKED;
+	DECLARE_MUTEX_LOCKED(sem);
 	
 	thread->sem = &sem;
 	thread->run = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)