diff options
Diffstat (limited to 'drivers/video/console/fbcon.c')
| -rw-r--r-- | drivers/video/console/fbcon.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 7ccc967831f..9c092b8d64e 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
| @@ -375,14 +375,14 @@ static void fb_flashcursor(struct work_struct *work) | |||
| 375 | int c; | 375 | int c; |
| 376 | int mode; | 376 | int mode; |
| 377 | 377 | ||
| 378 | acquire_console_sem(); | 378 | console_lock(); |
| 379 | if (ops && ops->currcon != -1) | 379 | if (ops && ops->currcon != -1) |
| 380 | vc = vc_cons[ops->currcon].d; | 380 | vc = vc_cons[ops->currcon].d; |
| 381 | 381 | ||
| 382 | if (!vc || !CON_IS_VISIBLE(vc) || | 382 | if (!vc || !CON_IS_VISIBLE(vc) || |
| 383 | registered_fb[con2fb_map[vc->vc_num]] != info || | 383 | registered_fb[con2fb_map[vc->vc_num]] != info || |
| 384 | vc->vc_deccm != 1) { | 384 | vc->vc_deccm != 1) { |
| 385 | release_console_sem(); | 385 | console_unlock(); |
| 386 | return; | 386 | return; |
| 387 | } | 387 | } |
| 388 | 388 | ||
| @@ -392,7 +392,7 @@ static void fb_flashcursor(struct work_struct *work) | |||
| 392 | CM_ERASE : CM_DRAW; | 392 | CM_ERASE : CM_DRAW; |
| 393 | ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), | 393 | ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), |
| 394 | get_color(vc, info, c, 0)); | 394 | get_color(vc, info, c, 0)); |
| 395 | release_console_sem(); | 395 | console_unlock(); |
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | static void cursor_timer_handler(unsigned long dev_addr) | 398 | static void cursor_timer_handler(unsigned long dev_addr) |
| @@ -836,7 +836,7 @@ static int set_con2fb_map(int unit, int newidx, int user) | |||
| 836 | 836 | ||
| 837 | found = search_fb_in_map(newidx); | 837 | found = search_fb_in_map(newidx); |
| 838 | 838 | ||
| 839 | acquire_console_sem(); | 839 | console_lock(); |
| 840 | con2fb_map[unit] = newidx; | 840 | con2fb_map[unit] = newidx; |
| 841 | if (!err && !found) | 841 | if (!err && !found) |
| 842 | err = con2fb_acquire_newinfo(vc, info, unit, oldidx); | 842 | err = con2fb_acquire_newinfo(vc, info, unit, oldidx); |
| @@ -863,7 +863,7 @@ static int set_con2fb_map(int unit, int newidx, int user) | |||
| 863 | if (!search_fb_in_map(info_idx)) | 863 | if (!search_fb_in_map(info_idx)) |
| 864 | info_idx = newidx; | 864 | info_idx = newidx; |
| 865 | 865 | ||
| 866 | release_console_sem(); | 866 | console_unlock(); |
| 867 | return err; | 867 | return err; |
| 868 | } | 868 | } |
| 869 | 869 | ||
| @@ -3321,7 +3321,7 @@ static ssize_t store_rotate(struct device *device, | |||
| 3321 | if (fbcon_has_exited) | 3321 | if (fbcon_has_exited) |
| 3322 | return count; | 3322 | return count; |
| 3323 | 3323 | ||
| 3324 | acquire_console_sem(); | 3324 | console_lock(); |
| 3325 | idx = con2fb_map[fg_console]; | 3325 | idx = con2fb_map[fg_console]; |
| 3326 | 3326 | ||
| 3327 | if (idx == -1 || registered_fb[idx] == NULL) | 3327 | if (idx == -1 || registered_fb[idx] == NULL) |
| @@ -3331,7 +3331,7 @@ static ssize_t store_rotate(struct device *device, | |||
| 3331 | rotate = simple_strtoul(buf, last, 0); | 3331 | rotate = simple_strtoul(buf, last, 0); |
| 3332 | fbcon_rotate(info, rotate); | 3332 | fbcon_rotate(info, rotate); |
| 3333 | err: | 3333 | err: |
| 3334 | release_console_sem(); | 3334 | console_unlock(); |
| 3335 | return count; | 3335 | return count; |
| 3336 | } | 3336 | } |
| 3337 | 3337 | ||
| @@ -3346,7 +3346,7 @@ static ssize_t store_rotate_all(struct device *device, | |||
| 3346 | if (fbcon_has_exited) | 3346 | if (fbcon_has_exited) |
| 3347 | return count; | 3347 | return count; |
| 3348 | 3348 | ||
| 3349 | acquire_console_sem(); | 3349 | console_lock(); |
| 3350 | idx = con2fb_map[fg_console]; | 3350 | idx = con2fb_map[fg_console]; |
| 3351 | 3351 | ||
| 3352 | if (idx == -1 || registered_fb[idx] == NULL) | 3352 | if (idx == -1 || registered_fb[idx] == NULL) |
| @@ -3356,7 +3356,7 @@ static ssize_t store_rotate_all(struct device *device, | |||
| 3356 | rotate = simple_strtoul(buf, last, 0); | 3356 | rotate = simple_strtoul(buf, last, 0); |
| 3357 | fbcon_rotate_all(info, rotate); | 3357 | fbcon_rotate_all(info, rotate); |
| 3358 | err: | 3358 | err: |
| 3359 | release_console_sem(); | 3359 | console_unlock(); |
| 3360 | return count; | 3360 | return count; |
| 3361 | } | 3361 | } |
| 3362 | 3362 | ||
| @@ -3369,7 +3369,7 @@ static ssize_t show_rotate(struct device *device, | |||
| 3369 | if (fbcon_has_exited) | 3369 | if (fbcon_has_exited) |
| 3370 | return 0; | 3370 | return 0; |
| 3371 | 3371 | ||
| 3372 | acquire_console_sem(); | 3372 | console_lock(); |
| 3373 | idx = con2fb_map[fg_console]; | 3373 | idx = con2fb_map[fg_console]; |
| 3374 | 3374 | ||
| 3375 | if (idx == -1 || registered_fb[idx] == NULL) | 3375 | if (idx == -1 || registered_fb[idx] == NULL) |
| @@ -3378,7 +3378,7 @@ static ssize_t show_rotate(struct device *device, | |||
| 3378 | info = registered_fb[idx]; | 3378 | info = registered_fb[idx]; |
| 3379 | rotate = fbcon_get_rotate(info); | 3379 | rotate = fbcon_get_rotate(info); |
| 3380 | err: | 3380 | err: |
| 3381 | release_console_sem(); | 3381 | console_unlock(); |
| 3382 | return snprintf(buf, PAGE_SIZE, "%d\n", rotate); | 3382 | return snprintf(buf, PAGE_SIZE, "%d\n", rotate); |
| 3383 | } | 3383 | } |
| 3384 | 3384 | ||
| @@ -3392,7 +3392,7 @@ static ssize_t show_cursor_blink(struct device *device, | |||
| 3392 | if (fbcon_has_exited) | 3392 | if (fbcon_has_exited) |
| 3393 | return 0; | 3393 | return 0; |
| 3394 | 3394 | ||
| 3395 | acquire_console_sem(); | 3395 | console_lock(); |
| 3396 | idx = con2fb_map[fg_console]; | 3396 | idx = con2fb_map[fg_console]; |
| 3397 | 3397 | ||
| 3398 | if (idx == -1 || registered_fb[idx] == NULL) | 3398 | if (idx == -1 || registered_fb[idx] == NULL) |
| @@ -3406,7 +3406,7 @@ static ssize_t show_cursor_blink(struct device *device, | |||
| 3406 | 3406 | ||
| 3407 | blink = (ops->flags & FBCON_FLAGS_CURSOR_TIMER) ? 1 : 0; | 3407 | blink = (ops->flags & FBCON_FLAGS_CURSOR_TIMER) ? 1 : 0; |
| 3408 | err: | 3408 | err: |
| 3409 | release_console_sem(); | 3409 | console_unlock(); |
| 3410 | return snprintf(buf, PAGE_SIZE, "%d\n", blink); | 3410 | return snprintf(buf, PAGE_SIZE, "%d\n", blink); |
| 3411 | } | 3411 | } |
| 3412 | 3412 | ||
| @@ -3421,7 +3421,7 @@ static ssize_t store_cursor_blink(struct device *device, | |||
| 3421 | if (fbcon_has_exited) | 3421 | if (fbcon_has_exited) |
| 3422 | return count; | 3422 | return count; |
| 3423 | 3423 | ||
| 3424 | acquire_console_sem(); | 3424 | console_lock(); |
| 3425 | idx = con2fb_map[fg_console]; | 3425 | idx = con2fb_map[fg_console]; |
| 3426 | 3426 | ||
| 3427 | if (idx == -1 || registered_fb[idx] == NULL) | 3427 | if (idx == -1 || registered_fb[idx] == NULL) |
| @@ -3443,7 +3443,7 @@ static ssize_t store_cursor_blink(struct device *device, | |||
| 3443 | } | 3443 | } |
| 3444 | 3444 | ||
| 3445 | err: | 3445 | err: |
| 3446 | release_console_sem(); | 3446 | console_unlock(); |
| 3447 | return count; | 3447 | return count; |
| 3448 | } | 3448 | } |
| 3449 | 3449 | ||
| @@ -3482,7 +3482,7 @@ static void fbcon_start(void) | |||
| 3482 | if (num_registered_fb) { | 3482 | if (num_registered_fb) { |
| 3483 | int i; | 3483 | int i; |
| 3484 | 3484 | ||
| 3485 | acquire_console_sem(); | 3485 | console_lock(); |
| 3486 | 3486 | ||
| 3487 | for (i = 0; i < FB_MAX; i++) { | 3487 | for (i = 0; i < FB_MAX; i++) { |
| 3488 | if (registered_fb[i] != NULL) { | 3488 | if (registered_fb[i] != NULL) { |
| @@ -3491,7 +3491,7 @@ static void fbcon_start(void) | |||
| 3491 | } | 3491 | } |
| 3492 | } | 3492 | } |
| 3493 | 3493 | ||
| 3494 | release_console_sem(); | 3494 | console_unlock(); |
| 3495 | fbcon_takeover(0); | 3495 | fbcon_takeover(0); |
| 3496 | } | 3496 | } |
| 3497 | } | 3497 | } |
| @@ -3552,7 +3552,7 @@ static int __init fb_console_init(void) | |||
| 3552 | { | 3552 | { |
| 3553 | int i; | 3553 | int i; |
| 3554 | 3554 | ||
| 3555 | acquire_console_sem(); | 3555 | console_lock(); |
| 3556 | fb_register_client(&fbcon_event_notifier); | 3556 | fb_register_client(&fbcon_event_notifier); |
| 3557 | fbcon_device = device_create(fb_class, NULL, MKDEV(0, 0), NULL, | 3557 | fbcon_device = device_create(fb_class, NULL, MKDEV(0, 0), NULL, |
| 3558 | "fbcon"); | 3558 | "fbcon"); |
| @@ -3568,7 +3568,7 @@ static int __init fb_console_init(void) | |||
| 3568 | for (i = 0; i < MAX_NR_CONSOLES; i++) | 3568 | for (i = 0; i < MAX_NR_CONSOLES; i++) |
| 3569 | con2fb_map[i] = -1; | 3569 | con2fb_map[i] = -1; |
| 3570 | 3570 | ||
| 3571 | release_console_sem(); | 3571 | console_unlock(); |
| 3572 | fbcon_start(); | 3572 | fbcon_start(); |
| 3573 | return 0; | 3573 | return 0; |
| 3574 | } | 3574 | } |
| @@ -3591,12 +3591,12 @@ static void __exit fbcon_deinit_device(void) | |||
| 3591 | 3591 | ||
| 3592 | static void __exit fb_console_exit(void) | 3592 | static void __exit fb_console_exit(void) |
| 3593 | { | 3593 | { |
| 3594 | acquire_console_sem(); | 3594 | console_lock(); |
| 3595 | fb_unregister_client(&fbcon_event_notifier); | 3595 | fb_unregister_client(&fbcon_event_notifier); |
| 3596 | fbcon_deinit_device(); | 3596 | fbcon_deinit_device(); |
| 3597 | device_destroy(fb_class, MKDEV(0, 0)); | 3597 | device_destroy(fb_class, MKDEV(0, 0)); |
| 3598 | fbcon_exit(); | 3598 | fbcon_exit(); |
| 3599 | release_console_sem(); | 3599 | console_unlock(); |
| 3600 | unregister_con_driver(&fb_con); | 3600 | unregister_con_driver(&fb_con); |
| 3601 | } | 3601 | } |
| 3602 | 3602 | ||
