uml: port mutex conversion

The port_sem 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 2aa9c5db e98fa281

+4 -3
+4 -3
arch/um/drivers/port_kern.c
··· 6 6 #include "linux/completion.h" 7 7 #include "linux/interrupt.h" 8 8 #include "linux/list.h" 9 + #include "linux/mutex.h" 9 10 #include "asm/atomic.h" 10 11 #include "init.h" 11 12 #include "irq_kern.h" ··· 121 120 return 0; 122 121 } 123 122 124 - static DECLARE_MUTEX(ports_sem); 123 + static DEFINE_MUTEX(ports_mutex); 125 124 static LIST_HEAD(ports); 126 125 127 126 static void port_work_proc(struct work_struct *unused) ··· 162 161 struct port_dev *dev = NULL; 163 162 int fd; 164 163 165 - down(&ports_sem); 164 + mutex_lock(&ports_mutex); 166 165 list_for_each(ele, &ports) { 167 166 port = list_entry(ele, struct port_list, list); 168 167 if (port->port == port_num) ··· 217 216 out_free: 218 217 kfree(port); 219 218 out: 220 - up(&ports_sem); 219 + mutex_unlock(&ports_mutex); 221 220 return dev; 222 221 } 223 222