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/ps3fb.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/ps3fb.c')
-rw-r--r-- | drivers/video/ps3fb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 9c0144ee7ae5..65560a1a0439 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -513,9 +513,9 @@ static int ps3fb_release(struct fb_info *info, int user) | |||
513 | if (atomic_dec_and_test(&ps3fb.f_count)) { | 513 | if (atomic_dec_and_test(&ps3fb.f_count)) { |
514 | if (atomic_read(&ps3fb.ext_flip)) { | 514 | if (atomic_read(&ps3fb.ext_flip)) { |
515 | atomic_set(&ps3fb.ext_flip, 0); | 515 | atomic_set(&ps3fb.ext_flip, 0); |
516 | if (!try_acquire_console_sem()) { | 516 | if (console_trylock()) { |
517 | ps3fb_sync(info, 0); /* single buffer */ | 517 | ps3fb_sync(info, 0); /* single buffer */ |
518 | release_console_sem(); | 518 | console_unlock(); |
519 | } | 519 | } |
520 | } | 520 | } |
521 | } | 521 | } |
@@ -830,14 +830,14 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
830 | if (vmode) { | 830 | if (vmode) { |
831 | var = info->var; | 831 | var = info->var; |
832 | fb_videomode_to_var(&var, vmode); | 832 | fb_videomode_to_var(&var, vmode); |
833 | acquire_console_sem(); | 833 | console_lock(); |
834 | info->flags |= FBINFO_MISC_USEREVENT; | 834 | info->flags |= FBINFO_MISC_USEREVENT; |
835 | /* Force, in case only special bits changed */ | 835 | /* Force, in case only special bits changed */ |
836 | var.activate |= FB_ACTIVATE_FORCE; | 836 | var.activate |= FB_ACTIVATE_FORCE; |
837 | par->new_mode_id = val; | 837 | par->new_mode_id = val; |
838 | retval = fb_set_var(info, &var); | 838 | retval = fb_set_var(info, &var); |
839 | info->flags &= ~FBINFO_MISC_USEREVENT; | 839 | info->flags &= ~FBINFO_MISC_USEREVENT; |
840 | release_console_sem(); | 840 | console_unlock(); |
841 | } | 841 | } |
842 | break; | 842 | break; |
843 | } | 843 | } |
@@ -881,9 +881,9 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
881 | break; | 881 | break; |
882 | 882 | ||
883 | dev_dbg(info->device, "PS3FB_IOCTL_FSEL:%d\n", val); | 883 | dev_dbg(info->device, "PS3FB_IOCTL_FSEL:%d\n", val); |
884 | acquire_console_sem(); | 884 | console_lock(); |
885 | retval = ps3fb_sync(info, val); | 885 | retval = ps3fb_sync(info, val); |
886 | release_console_sem(); | 886 | console_unlock(); |
887 | break; | 887 | break; |
888 | 888 | ||
889 | default: | 889 | default: |
@@ -903,9 +903,9 @@ static int ps3fbd(void *arg) | |||
903 | set_current_state(TASK_INTERRUPTIBLE); | 903 | set_current_state(TASK_INTERRUPTIBLE); |
904 | if (ps3fb.is_kicked) { | 904 | if (ps3fb.is_kicked) { |
905 | ps3fb.is_kicked = 0; | 905 | ps3fb.is_kicked = 0; |
906 | acquire_console_sem(); | 906 | console_lock(); |
907 | ps3fb_sync(info, 0); /* single buffer */ | 907 | ps3fb_sync(info, 0); /* single buffer */ |
908 | release_console_sem(); | 908 | console_unlock(); |
909 | } | 909 | } |
910 | schedule(); | 910 | schedule(); |
911 | } | 911 | } |