uml: mconsole mutex conversion

The plug_mem_mutex is already used as a mutex since it's using
DECLARE_MUTEX(), but the underlying construct is still a semaphore .. This
patch switches it over to a struct mutex.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Daniel Walker and committed by Linus Torvalds e98fa281 01ac835f

+4 -3
+4 -3
arch/um/drivers/mconsole_kern.c
··· 17 17 #include "linux/syscalls.h" 18 18 #include "linux/utsname.h" 19 19 #include "linux/workqueue.h" 20 + #include "linux/mutex.h" 20 21 #include "asm/uaccess.h" 21 22 #include "init.h" 22 23 #include "irq_kern.h" ··· 361 360 void *pages[UNPLUGGED_PER_PAGE]; 362 361 }; 363 362 364 - static DECLARE_MUTEX(plug_mem_mutex); 363 + static DEFINE_MUTEX(plug_mem_mutex); 365 364 static unsigned long long unplugged_pages_count = 0; 366 365 static LIST_HEAD(unplugged_pages); 367 366 static int unplug_index = UNPLUGGED_PER_PAGE; ··· 397 396 398 397 diff /= PAGE_SIZE; 399 398 400 - down(&plug_mem_mutex); 399 + mutex_lock(&plug_mem_mutex); 401 400 for (i = 0; i < diff; i++) { 402 401 struct unplugged_pages *unplugged; 403 402 void *addr; ··· 454 453 455 454 err = 0; 456 455 out_unlock: 457 - up(&plug_mem_mutex); 456 + mutex_unlock(&plug_mem_mutex); 458 457 out: 459 458 return err; 460 459 }