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/fbsysfs.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/fbsysfs.c')
-rw-r--r-- | drivers/video/fbsysfs.c | 20 |
1 files changed, 10 insertions, 10 deletions
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) | |||
90 | int err; | 90 | int err; |
91 | 91 | ||
92 | var->activate |= FB_ACTIVATE_FORCE; | 92 | var->activate |= FB_ACTIVATE_FORCE; |
93 | acquire_console_sem(); | 93 | console_lock(); |
94 | fb_info->flags |= FBINFO_MISC_USEREVENT; | 94 | fb_info->flags |= FBINFO_MISC_USEREVENT; |
95 | err = fb_set_var(fb_info, var); | 95 | err = fb_set_var(fb_info, var); |
96 | fb_info->flags &= ~FBINFO_MISC_USEREVENT; | 96 | fb_info->flags &= ~FBINFO_MISC_USEREVENT; |
97 | release_console_sem(); | 97 | console_unlock(); |
98 | if (err) | 98 | if (err) |
99 | return err; | 99 | return err; |
100 | return 0; | 100 | return 0; |
@@ -175,7 +175,7 @@ static ssize_t store_modes(struct device *device, | |||
175 | if (i * sizeof(struct fb_videomode) != count) | 175 | if (i * sizeof(struct fb_videomode) != count) |
176 | return -EINVAL; | 176 | return -EINVAL; |
177 | 177 | ||
178 | acquire_console_sem(); | 178 | console_lock(); |
179 | list_splice(&fb_info->modelist, &old_list); | 179 | list_splice(&fb_info->modelist, &old_list); |
180 | fb_videomode_to_modelist((const struct fb_videomode *)buf, i, | 180 | fb_videomode_to_modelist((const struct fb_videomode *)buf, i, |
181 | &fb_info->modelist); | 181 | &fb_info->modelist); |
@@ -185,7 +185,7 @@ static ssize_t store_modes(struct device *device, | |||
185 | } else | 185 | } else |
186 | fb_destroy_modelist(&old_list); | 186 | fb_destroy_modelist(&old_list); |
187 | 187 | ||
188 | release_console_sem(); | 188 | console_unlock(); |
189 | 189 | ||
190 | return 0; | 190 | return 0; |
191 | } | 191 | } |
@@ -301,11 +301,11 @@ static ssize_t store_blank(struct device *device, | |||
301 | char *last = NULL; | 301 | char *last = NULL; |
302 | int err; | 302 | int err; |
303 | 303 | ||
304 | acquire_console_sem(); | 304 | console_lock(); |
305 | fb_info->flags |= FBINFO_MISC_USEREVENT; | 305 | fb_info->flags |= FBINFO_MISC_USEREVENT; |
306 | err = fb_blank(fb_info, simple_strtoul(buf, &last, 0)); | 306 | err = fb_blank(fb_info, simple_strtoul(buf, &last, 0)); |
307 | fb_info->flags &= ~FBINFO_MISC_USEREVENT; | 307 | fb_info->flags &= ~FBINFO_MISC_USEREVENT; |
308 | release_console_sem(); | 308 | console_unlock(); |
309 | if (err < 0) | 309 | if (err < 0) |
310 | return err; | 310 | return err; |
311 | return count; | 311 | return count; |
@@ -364,9 +364,9 @@ static ssize_t store_pan(struct device *device, | |||
364 | return -EINVAL; | 364 | return -EINVAL; |
365 | var.yoffset = simple_strtoul(last, &last, 0); | 365 | var.yoffset = simple_strtoul(last, &last, 0); |
366 | 366 | ||
367 | acquire_console_sem(); | 367 | console_lock(); |
368 | err = fb_pan_display(fb_info, &var); | 368 | err = fb_pan_display(fb_info, &var); |
369 | release_console_sem(); | 369 | console_unlock(); |
370 | 370 | ||
371 | if (err < 0) | 371 | if (err < 0) |
372 | return err; | 372 | return err; |
@@ -399,9 +399,9 @@ static ssize_t store_fbstate(struct device *device, | |||
399 | 399 | ||
400 | state = simple_strtoul(buf, &last, 0); | 400 | state = simple_strtoul(buf, &last, 0); |
401 | 401 | ||
402 | acquire_console_sem(); | 402 | console_lock(); |
403 | fb_set_suspend(fb_info, (int)state); | 403 | fb_set_suspend(fb_info, (int)state); |
404 | release_console_sem(); | 404 | console_unlock(); |
405 | 405 | ||
406 | return count; | 406 | return count; |
407 | } | 407 | } |