diff options
author | Torben Hohn <torbenh@gmx.de> | 2011-01-25 18:07:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-25 19:50:06 -0500 |
commit | ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff (patch) | |
tree | e2d3f799e20e2cbca80891ea17af7484f21d628f /drivers/video/arkfb.c | |
parent | 3689456b4bd36027022b3215eb2acba51cd0e6b5 (diff) |
console: rename acquire/release_console_sem() to console_lock/unlock()
The -rt patches change the console_semaphore to console_mutex. As a
result, a quite large chunk of the patches changes all
acquire/release_console_sem() to acquire/release_console_mutex()
This commit makes things use more neutral function names which dont make
implications about the underlying lock.
The only real change is the return value of console_trylock which is
inverted from try_acquire_console_sem()
This patch also paves the way to switching console_sem from a semaphore to
a mutex.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
Signed-off-by: Torben Hohn <torbenh@gmx.de>
Cc: Thomas Gleixner <tglx@tglx.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/arkfb.c')
-rw-r--r-- | drivers/video/arkfb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index d583bea608fd..391ac939f011 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/svga.h> | 23 | #include <linux/svga.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/console.h> /* Why should fb driver call console functions? because acquire_console_sem() */ | 26 | #include <linux/console.h> /* Why should fb driver call console functions? because console_lock() */ |
27 | #include <video/vga.h> | 27 | #include <video/vga.h> |
28 | 28 | ||
29 | #ifdef CONFIG_MTRR | 29 | #ifdef CONFIG_MTRR |
@@ -1091,12 +1091,12 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state) | |||
1091 | 1091 | ||
1092 | dev_info(info->device, "suspend\n"); | 1092 | dev_info(info->device, "suspend\n"); |
1093 | 1093 | ||
1094 | acquire_console_sem(); | 1094 | console_lock(); |
1095 | mutex_lock(&(par->open_lock)); | 1095 | mutex_lock(&(par->open_lock)); |
1096 | 1096 | ||
1097 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { | 1097 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { |
1098 | mutex_unlock(&(par->open_lock)); | 1098 | mutex_unlock(&(par->open_lock)); |
1099 | release_console_sem(); | 1099 | console_unlock(); |
1100 | return 0; | 1100 | return 0; |
1101 | } | 1101 | } |
1102 | 1102 | ||
@@ -1107,7 +1107,7 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state) | |||
1107 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 1107 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
1108 | 1108 | ||
1109 | mutex_unlock(&(par->open_lock)); | 1109 | mutex_unlock(&(par->open_lock)); |
1110 | release_console_sem(); | 1110 | console_unlock(); |
1111 | 1111 | ||
1112 | return 0; | 1112 | return 0; |
1113 | } | 1113 | } |
@@ -1122,7 +1122,7 @@ static int ark_pci_resume (struct pci_dev* dev) | |||
1122 | 1122 | ||
1123 | dev_info(info->device, "resume\n"); | 1123 | dev_info(info->device, "resume\n"); |
1124 | 1124 | ||
1125 | acquire_console_sem(); | 1125 | console_lock(); |
1126 | mutex_lock(&(par->open_lock)); | 1126 | mutex_lock(&(par->open_lock)); |
1127 | 1127 | ||
1128 | if (par->ref_count == 0) | 1128 | if (par->ref_count == 0) |
@@ -1141,7 +1141,7 @@ static int ark_pci_resume (struct pci_dev* dev) | |||
1141 | 1141 | ||
1142 | fail: | 1142 | fail: |
1143 | mutex_unlock(&(par->open_lock)); | 1143 | mutex_unlock(&(par->open_lock)); |
1144 | release_console_sem(); | 1144 | console_unlock(); |
1145 | return 0; | 1145 | return 0; |
1146 | } | 1146 | } |
1147 | #else | 1147 | #else |