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/vt8623fb.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/vt8623fb.c')
-rw-r--r-- | drivers/video/vt8623fb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c index 85d76ec4c63e..a2965ab92cfb 100644 --- a/drivers/video/vt8623fb.c +++ b/drivers/video/vt8623fb.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 |
@@ -819,12 +819,12 @@ static int vt8623_pci_suspend(struct pci_dev* dev, pm_message_t state) | |||
819 | 819 | ||
820 | dev_info(info->device, "suspend\n"); | 820 | dev_info(info->device, "suspend\n"); |
821 | 821 | ||
822 | acquire_console_sem(); | 822 | console_lock(); |
823 | mutex_lock(&(par->open_lock)); | 823 | mutex_lock(&(par->open_lock)); |
824 | 824 | ||
825 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { | 825 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { |
826 | mutex_unlock(&(par->open_lock)); | 826 | mutex_unlock(&(par->open_lock)); |
827 | release_console_sem(); | 827 | console_unlock(); |
828 | return 0; | 828 | return 0; |
829 | } | 829 | } |
830 | 830 | ||
@@ -835,7 +835,7 @@ static int vt8623_pci_suspend(struct pci_dev* dev, pm_message_t state) | |||
835 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 835 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
836 | 836 | ||
837 | mutex_unlock(&(par->open_lock)); | 837 | mutex_unlock(&(par->open_lock)); |
838 | release_console_sem(); | 838 | console_unlock(); |
839 | 839 | ||
840 | return 0; | 840 | return 0; |
841 | } | 841 | } |
@@ -850,7 +850,7 @@ static int vt8623_pci_resume(struct pci_dev* dev) | |||
850 | 850 | ||
851 | dev_info(info->device, "resume\n"); | 851 | dev_info(info->device, "resume\n"); |
852 | 852 | ||
853 | acquire_console_sem(); | 853 | console_lock(); |
854 | mutex_lock(&(par->open_lock)); | 854 | mutex_lock(&(par->open_lock)); |
855 | 855 | ||
856 | if (par->ref_count == 0) | 856 | if (par->ref_count == 0) |
@@ -869,7 +869,7 @@ static int vt8623_pci_resume(struct pci_dev* dev) | |||
869 | 869 | ||
870 | fail: | 870 | fail: |
871 | mutex_unlock(&(par->open_lock)); | 871 | mutex_unlock(&(par->open_lock)); |
872 | release_console_sem(); | 872 | console_unlock(); |
873 | 873 | ||
874 | return 0; | 874 | return 0; |
875 | } | 875 | } |