diff options
| -rw-r--r-- | arch/um/drivers/mconsole_kern.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 949037e92a7b..9820fdbb9c73 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include "linux/syscalls.h" | 17 | #include "linux/syscalls.h" |
| 18 | #include "linux/utsname.h" | 18 | #include "linux/utsname.h" |
| 19 | #include "linux/workqueue.h" | 19 | #include "linux/workqueue.h" |
| 20 | #include "linux/mutex.h" | ||
| 20 | #include "asm/uaccess.h" | 21 | #include "asm/uaccess.h" |
| 21 | #include "init.h" | 22 | #include "init.h" |
| 22 | #include "irq_kern.h" | 23 | #include "irq_kern.h" |
| @@ -360,7 +361,7 @@ struct unplugged_pages { | |||
| 360 | void *pages[UNPLUGGED_PER_PAGE]; | 361 | void *pages[UNPLUGGED_PER_PAGE]; |
| 361 | }; | 362 | }; |
| 362 | 363 | ||
| 363 | static DECLARE_MUTEX(plug_mem_mutex); | 364 | static DEFINE_MUTEX(plug_mem_mutex); |
| 364 | static unsigned long long unplugged_pages_count = 0; | 365 | static unsigned long long unplugged_pages_count = 0; |
| 365 | static LIST_HEAD(unplugged_pages); | 366 | static LIST_HEAD(unplugged_pages); |
| 366 | static int unplug_index = UNPLUGGED_PER_PAGE; | 367 | static int unplug_index = UNPLUGGED_PER_PAGE; |
| @@ -396,7 +397,7 @@ static int mem_config(char *str, char **error_out) | |||
| 396 | 397 | ||
| 397 | diff /= PAGE_SIZE; | 398 | diff /= PAGE_SIZE; |
| 398 | 399 | ||
| 399 | down(&plug_mem_mutex); | 400 | mutex_lock(&plug_mem_mutex); |
| 400 | for (i = 0; i < diff; i++) { | 401 | for (i = 0; i < diff; i++) { |
| 401 | struct unplugged_pages *unplugged; | 402 | struct unplugged_pages *unplugged; |
| 402 | void *addr; | 403 | void *addr; |
| @@ -453,7 +454,7 @@ static int mem_config(char *str, char **error_out) | |||
| 453 | 454 | ||
| 454 | err = 0; | 455 | err = 0; |
| 455 | out_unlock: | 456 | out_unlock: |
| 456 | up(&plug_mem_mutex); | 457 | mutex_unlock(&plug_mem_mutex); |
| 457 | out: | 458 | out: |
| 458 | return err; | 459 | return err; |
| 459 | } | 460 | } |
