From ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff Mon Sep 17 00:00:00 2001 From: Torben Hohn Date: Tue, 25 Jan 2011 15:07:35 -0800 Subject: 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 Cc: Thomas Gleixner Cc: Greg KH Cc: Ingo Molnar Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/fbsysfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/video/fbsysfs.c') diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index 0a08f1341227..f4a32779168b 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c @@ -90,11 +90,11 @@ static int activate(struct fb_info *fb_info, struct fb_var_screeninfo *var) int err; var->activate |= FB_ACTIVATE_FORCE; - acquire_console_sem(); + console_lock(); fb_info->flags |= FBINFO_MISC_USEREVENT; err = fb_set_var(fb_info, var); fb_info->flags &= ~FBINFO_MISC_USEREVENT; - release_console_sem(); + console_unlock(); if (err) return err; return 0; @@ -175,7 +175,7 @@ static ssize_t store_modes(struct device *device, if (i * sizeof(struct fb_videomode) != count) return -EINVAL; - acquire_console_sem(); + console_lock(); list_splice(&fb_info->modelist, &old_list); fb_videomode_to_modelist((const struct fb_videomode *)buf, i, &fb_info->modelist); @@ -185,7 +185,7 @@ static ssize_t store_modes(struct device *device, } else fb_destroy_modelist(&old_list); - release_console_sem(); + console_unlock(); return 0; } @@ -301,11 +301,11 @@ static ssize_t store_blank(struct device *device, char *last = NULL; int err; - acquire_console_sem(); + console_lock(); fb_info->flags |= FBINFO_MISC_USEREVENT; err = fb_blank(fb_info, simple_strtoul(buf, &last, 0)); fb_info->flags &= ~FBINFO_MISC_USEREVENT; - release_console_sem(); + console_unlock(); if (err < 0) return err; return count; @@ -364,9 +364,9 @@ static ssize_t store_pan(struct device *device, return -EINVAL; var.yoffset = simple_strtoul(last, &last, 0); - acquire_console_sem(); + console_lock(); err = fb_pan_display(fb_info, &var); - release_console_sem(); + console_unlock(); if (err < 0) return err; @@ -399,9 +399,9 @@ static ssize_t store_fbstate(struct device *device, state = simple_strtoul(buf, &last, 0); - acquire_console_sem(); + console_lock(); fb_set_suspend(fb_info, (int)state); - release_console_sem(); + console_unlock(); return count; } -- cgit v1.2.3