diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/arkfb.c | 12 | ||||
-rw-r--r-- | drivers/video/aty/aty128fb.c | 12 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 10 | ||||
-rw-r--r-- | drivers/video/aty/radeon_pm.c | 10 | ||||
-rw-r--r-- | drivers/video/chipsfb.c | 8 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 42 | ||||
-rw-r--r-- | drivers/video/da8xx-fb.c | 8 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 12 | ||||
-rw-r--r-- | drivers/video/fbsysfs.c | 20 | ||||
-rw-r--r-- | drivers/video/geode/gxfb_core.c | 8 | ||||
-rw-r--r-- | drivers/video/geode/lxfb_core.c | 8 | ||||
-rw-r--r-- | drivers/video/i810/i810_main.c | 8 | ||||
-rw-r--r-- | drivers/video/jz4740_fb.c | 8 | ||||
-rw-r--r-- | drivers/video/mx3fb.c | 8 | ||||
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 8 | ||||
-rw-r--r-- | drivers/video/ps3fb.c | 16 | ||||
-rw-r--r-- | drivers/video/s3fb.c | 16 | ||||
-rw-r--r-- | drivers/video/savage/savagefb_driver.c | 8 | ||||
-rw-r--r-- | drivers/video/sh_mobile_hdmi.c | 8 | ||||
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 4 | ||||
-rw-r--r-- | drivers/video/sm501fb.c | 8 | ||||
-rw-r--r-- | drivers/video/tmiofb.c | 10 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 8 | ||||
-rw-r--r-- | drivers/video/vt8623fb.c | 12 | ||||
-rw-r--r-- | drivers/video/xen-fbfront.c | 4 |
25 files changed, 138 insertions, 138 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index d583bea608fd..391ac939f011 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.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 |
@@ -1091,12 +1091,12 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state) | |||
1091 | 1091 | ||
1092 | dev_info(info->device, "suspend\n"); | 1092 | dev_info(info->device, "suspend\n"); |
1093 | 1093 | ||
1094 | acquire_console_sem(); | 1094 | console_lock(); |
1095 | mutex_lock(&(par->open_lock)); | 1095 | mutex_lock(&(par->open_lock)); |
1096 | 1096 | ||
1097 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { | 1097 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { |
1098 | mutex_unlock(&(par->open_lock)); | 1098 | mutex_unlock(&(par->open_lock)); |
1099 | release_console_sem(); | 1099 | console_unlock(); |
1100 | return 0; | 1100 | return 0; |
1101 | } | 1101 | } |
1102 | 1102 | ||
@@ -1107,7 +1107,7 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state) | |||
1107 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 1107 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
1108 | 1108 | ||
1109 | mutex_unlock(&(par->open_lock)); | 1109 | mutex_unlock(&(par->open_lock)); |
1110 | release_console_sem(); | 1110 | console_unlock(); |
1111 | 1111 | ||
1112 | return 0; | 1112 | return 0; |
1113 | } | 1113 | } |
@@ -1122,7 +1122,7 @@ static int ark_pci_resume (struct pci_dev* dev) | |||
1122 | 1122 | ||
1123 | dev_info(info->device, "resume\n"); | 1123 | dev_info(info->device, "resume\n"); |
1124 | 1124 | ||
1125 | acquire_console_sem(); | 1125 | console_lock(); |
1126 | mutex_lock(&(par->open_lock)); | 1126 | mutex_lock(&(par->open_lock)); |
1127 | 1127 | ||
1128 | if (par->ref_count == 0) | 1128 | if (par->ref_count == 0) |
@@ -1141,7 +1141,7 @@ static int ark_pci_resume (struct pci_dev* dev) | |||
1141 | 1141 | ||
1142 | fail: | 1142 | fail: |
1143 | mutex_unlock(&(par->open_lock)); | 1143 | mutex_unlock(&(par->open_lock)); |
1144 | release_console_sem(); | 1144 | console_unlock(); |
1145 | return 0; | 1145 | return 0; |
1146 | } | 1146 | } |
1147 | #else | 1147 | #else |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index dd9de2e80580..4cb6a576c567 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -1860,11 +1860,11 @@ static void aty128_early_resume(void *data) | |||
1860 | { | 1860 | { |
1861 | struct aty128fb_par *par = data; | 1861 | struct aty128fb_par *par = data; |
1862 | 1862 | ||
1863 | if (try_acquire_console_sem()) | 1863 | if (!console_trylock()) |
1864 | return; | 1864 | return; |
1865 | pci_restore_state(par->pdev); | 1865 | pci_restore_state(par->pdev); |
1866 | aty128_do_resume(par->pdev); | 1866 | aty128_do_resume(par->pdev); |
1867 | release_console_sem(); | 1867 | console_unlock(); |
1868 | } | 1868 | } |
1869 | #endif /* CONFIG_PPC_PMAC */ | 1869 | #endif /* CONFIG_PPC_PMAC */ |
1870 | 1870 | ||
@@ -2438,7 +2438,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2438 | 2438 | ||
2439 | printk(KERN_DEBUG "aty128fb: suspending...\n"); | 2439 | printk(KERN_DEBUG "aty128fb: suspending...\n"); |
2440 | 2440 | ||
2441 | acquire_console_sem(); | 2441 | console_lock(); |
2442 | 2442 | ||
2443 | fb_set_suspend(info, 1); | 2443 | fb_set_suspend(info, 1); |
2444 | 2444 | ||
@@ -2470,7 +2470,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2470 | if (state.event != PM_EVENT_ON) | 2470 | if (state.event != PM_EVENT_ON) |
2471 | aty128_set_suspend(par, 1); | 2471 | aty128_set_suspend(par, 1); |
2472 | 2472 | ||
2473 | release_console_sem(); | 2473 | console_unlock(); |
2474 | 2474 | ||
2475 | pdev->dev.power.power_state = state; | 2475 | pdev->dev.power.power_state = state; |
2476 | 2476 | ||
@@ -2527,9 +2527,9 @@ static int aty128_pci_resume(struct pci_dev *pdev) | |||
2527 | { | 2527 | { |
2528 | int rc; | 2528 | int rc; |
2529 | 2529 | ||
2530 | acquire_console_sem(); | 2530 | console_lock(); |
2531 | rc = aty128_do_resume(pdev); | 2531 | rc = aty128_do_resume(pdev); |
2532 | release_console_sem(); | 2532 | console_unlock(); |
2533 | 2533 | ||
2534 | return rc; | 2534 | return rc; |
2535 | } | 2535 | } |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 767ab4fb1a05..94e293fce1d2 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2069,7 +2069,7 @@ static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2069 | if (state.event == pdev->dev.power.power_state.event) | 2069 | if (state.event == pdev->dev.power.power_state.event) |
2070 | return 0; | 2070 | return 0; |
2071 | 2071 | ||
2072 | acquire_console_sem(); | 2072 | console_lock(); |
2073 | 2073 | ||
2074 | fb_set_suspend(info, 1); | 2074 | fb_set_suspend(info, 1); |
2075 | 2075 | ||
@@ -2097,14 +2097,14 @@ static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2097 | par->lock_blank = 0; | 2097 | par->lock_blank = 0; |
2098 | atyfb_blank(FB_BLANK_UNBLANK, info); | 2098 | atyfb_blank(FB_BLANK_UNBLANK, info); |
2099 | fb_set_suspend(info, 0); | 2099 | fb_set_suspend(info, 0); |
2100 | release_console_sem(); | 2100 | console_unlock(); |
2101 | return -EIO; | 2101 | return -EIO; |
2102 | } | 2102 | } |
2103 | #else | 2103 | #else |
2104 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 2104 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
2105 | #endif | 2105 | #endif |
2106 | 2106 | ||
2107 | release_console_sem(); | 2107 | console_unlock(); |
2108 | 2108 | ||
2109 | pdev->dev.power.power_state = state; | 2109 | pdev->dev.power.power_state = state; |
2110 | 2110 | ||
@@ -2133,7 +2133,7 @@ static int atyfb_pci_resume(struct pci_dev *pdev) | |||
2133 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) | 2133 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) |
2134 | return 0; | 2134 | return 0; |
2135 | 2135 | ||
2136 | acquire_console_sem(); | 2136 | console_lock(); |
2137 | 2137 | ||
2138 | /* | 2138 | /* |
2139 | * PCI state will have been restored by the core, so | 2139 | * PCI state will have been restored by the core, so |
@@ -2161,7 +2161,7 @@ static int atyfb_pci_resume(struct pci_dev *pdev) | |||
2161 | par->lock_blank = 0; | 2161 | par->lock_blank = 0; |
2162 | atyfb_blank(FB_BLANK_UNBLANK, info); | 2162 | atyfb_blank(FB_BLANK_UNBLANK, info); |
2163 | 2163 | ||
2164 | release_console_sem(); | 2164 | console_unlock(); |
2165 | 2165 | ||
2166 | pdev->dev.power.power_state = PMSG_ON; | 2166 | pdev->dev.power.power_state = PMSG_ON; |
2167 | 2167 | ||
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index c4e17642d9c5..92bda5848516 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
@@ -2626,7 +2626,7 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) | |||
2626 | goto done; | 2626 | goto done; |
2627 | } | 2627 | } |
2628 | 2628 | ||
2629 | acquire_console_sem(); | 2629 | console_lock(); |
2630 | 2630 | ||
2631 | fb_set_suspend(info, 1); | 2631 | fb_set_suspend(info, 1); |
2632 | 2632 | ||
@@ -2690,7 +2690,7 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) | |||
2690 | if (rinfo->pm_mode & radeon_pm_d2) | 2690 | if (rinfo->pm_mode & radeon_pm_d2) |
2691 | radeon_set_suspend(rinfo, 1); | 2691 | radeon_set_suspend(rinfo, 1); |
2692 | 2692 | ||
2693 | release_console_sem(); | 2693 | console_unlock(); |
2694 | 2694 | ||
2695 | done: | 2695 | done: |
2696 | pdev->dev.power.power_state = mesg; | 2696 | pdev->dev.power.power_state = mesg; |
@@ -2715,10 +2715,10 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2715 | return 0; | 2715 | return 0; |
2716 | 2716 | ||
2717 | if (rinfo->no_schedule) { | 2717 | if (rinfo->no_schedule) { |
2718 | if (try_acquire_console_sem()) | 2718 | if (!console_trylock()) |
2719 | return 0; | 2719 | return 0; |
2720 | } else | 2720 | } else |
2721 | acquire_console_sem(); | 2721 | console_lock(); |
2722 | 2722 | ||
2723 | printk(KERN_DEBUG "radeonfb (%s): resuming from state: %d...\n", | 2723 | printk(KERN_DEBUG "radeonfb (%s): resuming from state: %d...\n", |
2724 | pci_name(pdev), pdev->dev.power.power_state.event); | 2724 | pci_name(pdev), pdev->dev.power.power_state.event); |
@@ -2783,7 +2783,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2783 | pdev->dev.power.power_state = PMSG_ON; | 2783 | pdev->dev.power.power_state = PMSG_ON; |
2784 | 2784 | ||
2785 | bail: | 2785 | bail: |
2786 | release_console_sem(); | 2786 | console_unlock(); |
2787 | 2787 | ||
2788 | return rc; | 2788 | return rc; |
2789 | } | 2789 | } |
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index d637e1f53172..cff742abdc5d 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
@@ -460,10 +460,10 @@ static int chipsfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
460 | if (!(state.event & PM_EVENT_SLEEP)) | 460 | if (!(state.event & PM_EVENT_SLEEP)) |
461 | goto done; | 461 | goto done; |
462 | 462 | ||
463 | acquire_console_sem(); | 463 | console_lock(); |
464 | chipsfb_blank(1, p); | 464 | chipsfb_blank(1, p); |
465 | fb_set_suspend(p, 1); | 465 | fb_set_suspend(p, 1); |
466 | release_console_sem(); | 466 | console_unlock(); |
467 | done: | 467 | done: |
468 | pdev->dev.power.power_state = state; | 468 | pdev->dev.power.power_state = state; |
469 | return 0; | 469 | return 0; |
@@ -473,10 +473,10 @@ static int chipsfb_pci_resume(struct pci_dev *pdev) | |||
473 | { | 473 | { |
474 | struct fb_info *p = pci_get_drvdata(pdev); | 474 | struct fb_info *p = pci_get_drvdata(pdev); |
475 | 475 | ||
476 | acquire_console_sem(); | 476 | console_lock(); |
477 | fb_set_suspend(p, 0); | 477 | fb_set_suspend(p, 0); |
478 | chipsfb_blank(0, p); | 478 | chipsfb_blank(0, p); |
479 | release_console_sem(); | 479 | console_unlock(); |
480 | 480 | ||
481 | pdev->dev.power.power_state = PMSG_ON; | 481 | pdev->dev.power.power_state = PMSG_ON; |
482 | return 0; | 482 | return 0; |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 7ccc967831f0..9c092b8d64e6 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 | ||
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 520047ac6e3e..8d61ef96eedd 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
@@ -1131,14 +1131,14 @@ static int fb_suspend(struct platform_device *dev, pm_message_t state) | |||
1131 | struct fb_info *info = platform_get_drvdata(dev); | 1131 | struct fb_info *info = platform_get_drvdata(dev); |
1132 | struct da8xx_fb_par *par = info->par; | 1132 | struct da8xx_fb_par *par = info->par; |
1133 | 1133 | ||
1134 | acquire_console_sem(); | 1134 | console_lock(); |
1135 | if (par->panel_power_ctrl) | 1135 | if (par->panel_power_ctrl) |
1136 | par->panel_power_ctrl(0); | 1136 | par->panel_power_ctrl(0); |
1137 | 1137 | ||
1138 | fb_set_suspend(info, 1); | 1138 | fb_set_suspend(info, 1); |
1139 | lcd_disable_raster(); | 1139 | lcd_disable_raster(); |
1140 | clk_disable(par->lcdc_clk); | 1140 | clk_disable(par->lcdc_clk); |
1141 | release_console_sem(); | 1141 | console_unlock(); |
1142 | 1142 | ||
1143 | return 0; | 1143 | return 0; |
1144 | } | 1144 | } |
@@ -1147,14 +1147,14 @@ static int fb_resume(struct platform_device *dev) | |||
1147 | struct fb_info *info = platform_get_drvdata(dev); | 1147 | struct fb_info *info = platform_get_drvdata(dev); |
1148 | struct da8xx_fb_par *par = info->par; | 1148 | struct da8xx_fb_par *par = info->par; |
1149 | 1149 | ||
1150 | acquire_console_sem(); | 1150 | console_lock(); |
1151 | if (par->panel_power_ctrl) | 1151 | if (par->panel_power_ctrl) |
1152 | par->panel_power_ctrl(1); | 1152 | par->panel_power_ctrl(1); |
1153 | 1153 | ||
1154 | clk_enable(par->lcdc_clk); | 1154 | clk_enable(par->lcdc_clk); |
1155 | lcd_enable_raster(); | 1155 | lcd_enable_raster(); |
1156 | fb_set_suspend(info, 0); | 1156 | fb_set_suspend(info, 0); |
1157 | release_console_sem(); | 1157 | console_unlock(); |
1158 | 1158 | ||
1159 | return 0; | 1159 | return 0; |
1160 | } | 1160 | } |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 4ac1201ad6c2..e2bf95370e40 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1036,11 +1036,11 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
1036 | return -EFAULT; | 1036 | return -EFAULT; |
1037 | if (!lock_fb_info(info)) | 1037 | if (!lock_fb_info(info)) |
1038 | return -ENODEV; | 1038 | return -ENODEV; |
1039 | acquire_console_sem(); | 1039 | console_lock(); |
1040 | info->flags |= FBINFO_MISC_USEREVENT; | 1040 | info->flags |= FBINFO_MISC_USEREVENT; |
1041 | ret = fb_set_var(info, &var); | 1041 | ret = fb_set_var(info, &var); |
1042 | info->flags &= ~FBINFO_MISC_USEREVENT; | 1042 | info->flags &= ~FBINFO_MISC_USEREVENT; |
1043 | release_console_sem(); | 1043 | console_unlock(); |
1044 | unlock_fb_info(info); | 1044 | unlock_fb_info(info); |
1045 | if (!ret && copy_to_user(argp, &var, sizeof(var))) | 1045 | if (!ret && copy_to_user(argp, &var, sizeof(var))) |
1046 | ret = -EFAULT; | 1046 | ret = -EFAULT; |
@@ -1072,9 +1072,9 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
1072 | return -EFAULT; | 1072 | return -EFAULT; |
1073 | if (!lock_fb_info(info)) | 1073 | if (!lock_fb_info(info)) |
1074 | return -ENODEV; | 1074 | return -ENODEV; |
1075 | acquire_console_sem(); | 1075 | console_lock(); |
1076 | ret = fb_pan_display(info, &var); | 1076 | ret = fb_pan_display(info, &var); |
1077 | release_console_sem(); | 1077 | console_unlock(); |
1078 | unlock_fb_info(info); | 1078 | unlock_fb_info(info); |
1079 | if (ret == 0 && copy_to_user(argp, &var, sizeof(var))) | 1079 | if (ret == 0 && copy_to_user(argp, &var, sizeof(var))) |
1080 | return -EFAULT; | 1080 | return -EFAULT; |
@@ -1119,11 +1119,11 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
1119 | case FBIOBLANK: | 1119 | case FBIOBLANK: |
1120 | if (!lock_fb_info(info)) | 1120 | if (!lock_fb_info(info)) |
1121 | return -ENODEV; | 1121 | return -ENODEV; |
1122 | acquire_console_sem(); | 1122 | console_lock(); |
1123 | info->flags |= FBINFO_MISC_USEREVENT; | 1123 | info->flags |= FBINFO_MISC_USEREVENT; |
1124 | ret = fb_blank(info, arg); | 1124 | ret = fb_blank(info, arg); |
1125 | info->flags &= ~FBINFO_MISC_USEREVENT; | 1125 | info->flags &= ~FBINFO_MISC_USEREVENT; |
1126 | release_console_sem(); | 1126 | console_unlock(); |
1127 | unlock_fb_info(info); | 1127 | unlock_fb_info(info); |
1128 | break; | 1128 | break; |
1129 | default: | 1129 | default: |
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 | } |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index 70b1d9d51c96..b4f19db9bb54 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
@@ -344,10 +344,10 @@ static int gxfb_suspend(struct pci_dev *pdev, pm_message_t state) | |||
344 | struct fb_info *info = pci_get_drvdata(pdev); | 344 | struct fb_info *info = pci_get_drvdata(pdev); |
345 | 345 | ||
346 | if (state.event == PM_EVENT_SUSPEND) { | 346 | if (state.event == PM_EVENT_SUSPEND) { |
347 | acquire_console_sem(); | 347 | console_lock(); |
348 | gx_powerdown(info); | 348 | gx_powerdown(info); |
349 | fb_set_suspend(info, 1); | 349 | fb_set_suspend(info, 1); |
350 | release_console_sem(); | 350 | console_unlock(); |
351 | } | 351 | } |
352 | 352 | ||
353 | /* there's no point in setting PCI states; we emulate PCI, so | 353 | /* there's no point in setting PCI states; we emulate PCI, so |
@@ -361,7 +361,7 @@ static int gxfb_resume(struct pci_dev *pdev) | |||
361 | struct fb_info *info = pci_get_drvdata(pdev); | 361 | struct fb_info *info = pci_get_drvdata(pdev); |
362 | int ret; | 362 | int ret; |
363 | 363 | ||
364 | acquire_console_sem(); | 364 | console_lock(); |
365 | ret = gx_powerup(info); | 365 | ret = gx_powerup(info); |
366 | if (ret) { | 366 | if (ret) { |
367 | printk(KERN_ERR "gxfb: power up failed!\n"); | 367 | printk(KERN_ERR "gxfb: power up failed!\n"); |
@@ -369,7 +369,7 @@ static int gxfb_resume(struct pci_dev *pdev) | |||
369 | } | 369 | } |
370 | 370 | ||
371 | fb_set_suspend(info, 0); | 371 | fb_set_suspend(info, 0); |
372 | release_console_sem(); | 372 | console_unlock(); |
373 | return 0; | 373 | return 0; |
374 | } | 374 | } |
375 | #endif | 375 | #endif |
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c index 39bdbedf43b4..416851ca8754 100644 --- a/drivers/video/geode/lxfb_core.c +++ b/drivers/video/geode/lxfb_core.c | |||
@@ -465,10 +465,10 @@ static int lxfb_suspend(struct pci_dev *pdev, pm_message_t state) | |||
465 | struct fb_info *info = pci_get_drvdata(pdev); | 465 | struct fb_info *info = pci_get_drvdata(pdev); |
466 | 466 | ||
467 | if (state.event == PM_EVENT_SUSPEND) { | 467 | if (state.event == PM_EVENT_SUSPEND) { |
468 | acquire_console_sem(); | 468 | console_lock(); |
469 | lx_powerdown(info); | 469 | lx_powerdown(info); |
470 | fb_set_suspend(info, 1); | 470 | fb_set_suspend(info, 1); |
471 | release_console_sem(); | 471 | console_unlock(); |
472 | } | 472 | } |
473 | 473 | ||
474 | /* there's no point in setting PCI states; we emulate PCI, so | 474 | /* there's no point in setting PCI states; we emulate PCI, so |
@@ -482,7 +482,7 @@ static int lxfb_resume(struct pci_dev *pdev) | |||
482 | struct fb_info *info = pci_get_drvdata(pdev); | 482 | struct fb_info *info = pci_get_drvdata(pdev); |
483 | int ret; | 483 | int ret; |
484 | 484 | ||
485 | acquire_console_sem(); | 485 | console_lock(); |
486 | ret = lx_powerup(info); | 486 | ret = lx_powerup(info); |
487 | if (ret) { | 487 | if (ret) { |
488 | printk(KERN_ERR "lxfb: power up failed!\n"); | 488 | printk(KERN_ERR "lxfb: power up failed!\n"); |
@@ -490,7 +490,7 @@ static int lxfb_resume(struct pci_dev *pdev) | |||
490 | } | 490 | } |
491 | 491 | ||
492 | fb_set_suspend(info, 0); | 492 | fb_set_suspend(info, 0); |
493 | release_console_sem(); | 493 | console_unlock(); |
494 | return 0; | 494 | return 0; |
495 | } | 495 | } |
496 | #else | 496 | #else |
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index 5743ea25e818..318f6fb895b2 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -1574,7 +1574,7 @@ static int i810fb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
1574 | return 0; | 1574 | return 0; |
1575 | } | 1575 | } |
1576 | 1576 | ||
1577 | acquire_console_sem(); | 1577 | console_lock(); |
1578 | fb_set_suspend(info, 1); | 1578 | fb_set_suspend(info, 1); |
1579 | 1579 | ||
1580 | if (info->fbops->fb_sync) | 1580 | if (info->fbops->fb_sync) |
@@ -1587,7 +1587,7 @@ static int i810fb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
1587 | pci_save_state(dev); | 1587 | pci_save_state(dev); |
1588 | pci_disable_device(dev); | 1588 | pci_disable_device(dev); |
1589 | pci_set_power_state(dev, pci_choose_state(dev, mesg)); | 1589 | pci_set_power_state(dev, pci_choose_state(dev, mesg)); |
1590 | release_console_sem(); | 1590 | console_unlock(); |
1591 | 1591 | ||
1592 | return 0; | 1592 | return 0; |
1593 | } | 1593 | } |
@@ -1605,7 +1605,7 @@ static int i810fb_resume(struct pci_dev *dev) | |||
1605 | return 0; | 1605 | return 0; |
1606 | } | 1606 | } |
1607 | 1607 | ||
1608 | acquire_console_sem(); | 1608 | console_lock(); |
1609 | pci_set_power_state(dev, PCI_D0); | 1609 | pci_set_power_state(dev, PCI_D0); |
1610 | pci_restore_state(dev); | 1610 | pci_restore_state(dev); |
1611 | 1611 | ||
@@ -1621,7 +1621,7 @@ static int i810fb_resume(struct pci_dev *dev) | |||
1621 | fb_set_suspend (info, 0); | 1621 | fb_set_suspend (info, 0); |
1622 | info->fbops->fb_blank(VESA_NO_BLANKING, info); | 1622 | info->fbops->fb_blank(VESA_NO_BLANKING, info); |
1623 | fail: | 1623 | fail: |
1624 | release_console_sem(); | 1624 | console_unlock(); |
1625 | return 0; | 1625 | return 0; |
1626 | } | 1626 | } |
1627 | /*********************************************************************** | 1627 | /*********************************************************************** |
diff --git a/drivers/video/jz4740_fb.c b/drivers/video/jz4740_fb.c index 670ecaa0385a..de366937c933 100644 --- a/drivers/video/jz4740_fb.c +++ b/drivers/video/jz4740_fb.c | |||
@@ -778,9 +778,9 @@ static int jzfb_suspend(struct device *dev) | |||
778 | { | 778 | { |
779 | struct jzfb *jzfb = dev_get_drvdata(dev); | 779 | struct jzfb *jzfb = dev_get_drvdata(dev); |
780 | 780 | ||
781 | acquire_console_sem(); | 781 | console_lock(); |
782 | fb_set_suspend(jzfb->fb, 1); | 782 | fb_set_suspend(jzfb->fb, 1); |
783 | release_console_sem(); | 783 | console_unlock(); |
784 | 784 | ||
785 | mutex_lock(&jzfb->lock); | 785 | mutex_lock(&jzfb->lock); |
786 | if (jzfb->is_enabled) | 786 | if (jzfb->is_enabled) |
@@ -800,9 +800,9 @@ static int jzfb_resume(struct device *dev) | |||
800 | jzfb_enable(jzfb); | 800 | jzfb_enable(jzfb); |
801 | mutex_unlock(&jzfb->lock); | 801 | mutex_unlock(&jzfb->lock); |
802 | 802 | ||
803 | acquire_console_sem(); | 803 | console_lock(); |
804 | fb_set_suspend(jzfb->fb, 0); | 804 | fb_set_suspend(jzfb->fb, 0); |
805 | release_console_sem(); | 805 | console_unlock(); |
806 | 806 | ||
807 | return 0; | 807 | return 0; |
808 | } | 808 | } |
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index cb013919e9ce..7e3a490e8d76 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c | |||
@@ -1177,9 +1177,9 @@ static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state) | |||
1177 | struct mx3fb_data *mx3fb = platform_get_drvdata(pdev); | 1177 | struct mx3fb_data *mx3fb = platform_get_drvdata(pdev); |
1178 | struct mx3fb_info *mx3_fbi = mx3fb->fbi->par; | 1178 | struct mx3fb_info *mx3_fbi = mx3fb->fbi->par; |
1179 | 1179 | ||
1180 | acquire_console_sem(); | 1180 | console_lock(); |
1181 | fb_set_suspend(mx3fb->fbi, 1); | 1181 | fb_set_suspend(mx3fb->fbi, 1); |
1182 | release_console_sem(); | 1182 | console_unlock(); |
1183 | 1183 | ||
1184 | if (mx3_fbi->blank == FB_BLANK_UNBLANK) { | 1184 | if (mx3_fbi->blank == FB_BLANK_UNBLANK) { |
1185 | sdc_disable_channel(mx3_fbi); | 1185 | sdc_disable_channel(mx3_fbi); |
@@ -1202,9 +1202,9 @@ static int mx3fb_resume(struct platform_device *pdev) | |||
1202 | sdc_set_brightness(mx3fb, mx3fb->backlight_level); | 1202 | sdc_set_brightness(mx3fb, mx3fb->backlight_level); |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | acquire_console_sem(); | 1205 | console_lock(); |
1206 | fb_set_suspend(mx3fb->fbi, 0); | 1206 | fb_set_suspend(mx3fb->fbi, 0); |
1207 | release_console_sem(); | 1207 | console_unlock(); |
1208 | 1208 | ||
1209 | return 0; | 1209 | return 0; |
1210 | } | 1210 | } |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index efe10ff86d63..081dc4745274 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -1057,7 +1057,7 @@ static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
1057 | 1057 | ||
1058 | if (mesg.event == PM_EVENT_PRETHAW) | 1058 | if (mesg.event == PM_EVENT_PRETHAW) |
1059 | mesg.event = PM_EVENT_FREEZE; | 1059 | mesg.event = PM_EVENT_FREEZE; |
1060 | acquire_console_sem(); | 1060 | console_lock(); |
1061 | par->pm_state = mesg.event; | 1061 | par->pm_state = mesg.event; |
1062 | 1062 | ||
1063 | if (mesg.event & PM_EVENT_SLEEP) { | 1063 | if (mesg.event & PM_EVENT_SLEEP) { |
@@ -1070,7 +1070,7 @@ static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
1070 | } | 1070 | } |
1071 | dev->dev.power.power_state = mesg; | 1071 | dev->dev.power.power_state = mesg; |
1072 | 1072 | ||
1073 | release_console_sem(); | 1073 | console_unlock(); |
1074 | return 0; | 1074 | return 0; |
1075 | } | 1075 | } |
1076 | 1076 | ||
@@ -1079,7 +1079,7 @@ static int nvidiafb_resume(struct pci_dev *dev) | |||
1079 | struct fb_info *info = pci_get_drvdata(dev); | 1079 | struct fb_info *info = pci_get_drvdata(dev); |
1080 | struct nvidia_par *par = info->par; | 1080 | struct nvidia_par *par = info->par; |
1081 | 1081 | ||
1082 | acquire_console_sem(); | 1082 | console_lock(); |
1083 | pci_set_power_state(dev, PCI_D0); | 1083 | pci_set_power_state(dev, PCI_D0); |
1084 | 1084 | ||
1085 | if (par->pm_state != PM_EVENT_FREEZE) { | 1085 | if (par->pm_state != PM_EVENT_FREEZE) { |
@@ -1097,7 +1097,7 @@ static int nvidiafb_resume(struct pci_dev *dev) | |||
1097 | nvidiafb_blank(FB_BLANK_UNBLANK, info); | 1097 | nvidiafb_blank(FB_BLANK_UNBLANK, info); |
1098 | 1098 | ||
1099 | fail: | 1099 | fail: |
1100 | release_console_sem(); | 1100 | console_unlock(); |
1101 | return 0; | 1101 | return 0; |
1102 | } | 1102 | } |
1103 | #else | 1103 | #else |
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 | } |
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index dce8c97b4333..75738a928610 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/svga.h> | 22 | #include <linux/svga.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/console.h> /* Why should fb driver call console functions? because acquire_console_sem() */ | 25 | #include <linux/console.h> /* Why should fb driver call console functions? because console_lock() */ |
26 | #include <video/vga.h> | 26 | #include <video/vga.h> |
27 | 27 | ||
28 | #ifdef CONFIG_MTRR | 28 | #ifdef CONFIG_MTRR |
@@ -1113,12 +1113,12 @@ static int s3_pci_suspend(struct pci_dev* dev, pm_message_t state) | |||
1113 | 1113 | ||
1114 | dev_info(info->device, "suspend\n"); | 1114 | dev_info(info->device, "suspend\n"); |
1115 | 1115 | ||
1116 | acquire_console_sem(); | 1116 | console_lock(); |
1117 | mutex_lock(&(par->open_lock)); | 1117 | mutex_lock(&(par->open_lock)); |
1118 | 1118 | ||
1119 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { | 1119 | if ((state.event == PM_EVENT_FREEZE) || (par->ref_count == 0)) { |
1120 | mutex_unlock(&(par->open_lock)); | 1120 | mutex_unlock(&(par->open_lock)); |
1121 | release_console_sem(); | 1121 | console_unlock(); |
1122 | return 0; | 1122 | return 0; |
1123 | } | 1123 | } |
1124 | 1124 | ||
@@ -1129,7 +1129,7 @@ static int s3_pci_suspend(struct pci_dev* dev, pm_message_t state) | |||
1129 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 1129 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
1130 | 1130 | ||
1131 | mutex_unlock(&(par->open_lock)); | 1131 | mutex_unlock(&(par->open_lock)); |
1132 | release_console_sem(); | 1132 | console_unlock(); |
1133 | 1133 | ||
1134 | return 0; | 1134 | return 0; |
1135 | } | 1135 | } |
@@ -1145,12 +1145,12 @@ static int s3_pci_resume(struct pci_dev* dev) | |||
1145 | 1145 | ||
1146 | dev_info(info->device, "resume\n"); | 1146 | dev_info(info->device, "resume\n"); |
1147 | 1147 | ||
1148 | acquire_console_sem(); | 1148 | console_lock(); |
1149 | mutex_lock(&(par->open_lock)); | 1149 | mutex_lock(&(par->open_lock)); |
1150 | 1150 | ||
1151 | if (par->ref_count == 0) { | 1151 | if (par->ref_count == 0) { |
1152 | mutex_unlock(&(par->open_lock)); | 1152 | mutex_unlock(&(par->open_lock)); |
1153 | release_console_sem(); | 1153 | console_unlock(); |
1154 | return 0; | 1154 | return 0; |
1155 | } | 1155 | } |
1156 | 1156 | ||
@@ -1159,7 +1159,7 @@ static int s3_pci_resume(struct pci_dev* dev) | |||
1159 | err = pci_enable_device(dev); | 1159 | err = pci_enable_device(dev); |
1160 | if (err) { | 1160 | if (err) { |
1161 | mutex_unlock(&(par->open_lock)); | 1161 | mutex_unlock(&(par->open_lock)); |
1162 | release_console_sem(); | 1162 | console_unlock(); |
1163 | dev_err(info->device, "error %d enabling device for resume\n", err); | 1163 | dev_err(info->device, "error %d enabling device for resume\n", err); |
1164 | return err; | 1164 | return err; |
1165 | } | 1165 | } |
@@ -1169,7 +1169,7 @@ static int s3_pci_resume(struct pci_dev* dev) | |||
1169 | fb_set_suspend(info, 0); | 1169 | fb_set_suspend(info, 0); |
1170 | 1170 | ||
1171 | mutex_unlock(&(par->open_lock)); | 1171 | mutex_unlock(&(par->open_lock)); |
1172 | release_console_sem(); | 1172 | console_unlock(); |
1173 | 1173 | ||
1174 | return 0; | 1174 | return 0; |
1175 | } | 1175 | } |
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 842d157e1025..487911e2926c 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -2373,7 +2373,7 @@ static int savagefb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
2373 | if (mesg.event == PM_EVENT_FREEZE) | 2373 | if (mesg.event == PM_EVENT_FREEZE) |
2374 | return 0; | 2374 | return 0; |
2375 | 2375 | ||
2376 | acquire_console_sem(); | 2376 | console_lock(); |
2377 | fb_set_suspend(info, 1); | 2377 | fb_set_suspend(info, 1); |
2378 | 2378 | ||
2379 | if (info->fbops->fb_sync) | 2379 | if (info->fbops->fb_sync) |
@@ -2385,7 +2385,7 @@ static int savagefb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
2385 | pci_save_state(dev); | 2385 | pci_save_state(dev); |
2386 | pci_disable_device(dev); | 2386 | pci_disable_device(dev); |
2387 | pci_set_power_state(dev, pci_choose_state(dev, mesg)); | 2387 | pci_set_power_state(dev, pci_choose_state(dev, mesg)); |
2388 | release_console_sem(); | 2388 | console_unlock(); |
2389 | 2389 | ||
2390 | return 0; | 2390 | return 0; |
2391 | } | 2391 | } |
@@ -2409,7 +2409,7 @@ static int savagefb_resume(struct pci_dev* dev) | |||
2409 | return 0; | 2409 | return 0; |
2410 | } | 2410 | } |
2411 | 2411 | ||
2412 | acquire_console_sem(); | 2412 | console_lock(); |
2413 | 2413 | ||
2414 | pci_set_power_state(dev, PCI_D0); | 2414 | pci_set_power_state(dev, PCI_D0); |
2415 | pci_restore_state(dev); | 2415 | pci_restore_state(dev); |
@@ -2423,7 +2423,7 @@ static int savagefb_resume(struct pci_dev* dev) | |||
2423 | savagefb_set_par(info); | 2423 | savagefb_set_par(info); |
2424 | fb_set_suspend(info, 0); | 2424 | fb_set_suspend(info, 0); |
2425 | savagefb_blank(FB_BLANK_UNBLANK, info); | 2425 | savagefb_blank(FB_BLANK_UNBLANK, info); |
2426 | release_console_sem(); | 2426 | console_unlock(); |
2427 | 2427 | ||
2428 | return 0; | 2428 | return 0; |
2429 | } | 2429 | } |
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 74d9f546a2e8..2b9e56a6bde4 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c | |||
@@ -1151,7 +1151,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1151 | 1151 | ||
1152 | ch = info->par; | 1152 | ch = info->par; |
1153 | 1153 | ||
1154 | acquire_console_sem(); | 1154 | console_lock(); |
1155 | 1155 | ||
1156 | /* HDMI plug in */ | 1156 | /* HDMI plug in */ |
1157 | if (!sh_hdmi_must_reconfigure(hdmi) && | 1157 | if (!sh_hdmi_must_reconfigure(hdmi) && |
@@ -1171,7 +1171,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1171 | fb_set_suspend(info, 0); | 1171 | fb_set_suspend(info, 0); |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | release_console_sem(); | 1174 | console_unlock(); |
1175 | } else { | 1175 | } else { |
1176 | ret = 0; | 1176 | ret = 0; |
1177 | if (!hdmi->info) | 1177 | if (!hdmi->info) |
@@ -1181,12 +1181,12 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1181 | fb_destroy_modedb(hdmi->monspec.modedb); | 1181 | fb_destroy_modedb(hdmi->monspec.modedb); |
1182 | hdmi->monspec.modedb = NULL; | 1182 | hdmi->monspec.modedb = NULL; |
1183 | 1183 | ||
1184 | acquire_console_sem(); | 1184 | console_lock(); |
1185 | 1185 | ||
1186 | /* HDMI disconnect */ | 1186 | /* HDMI disconnect */ |
1187 | fb_set_suspend(hdmi->info, 1); | 1187 | fb_set_suspend(hdmi->info, 1); |
1188 | 1188 | ||
1189 | release_console_sem(); | 1189 | console_unlock(); |
1190 | pm_runtime_put(hdmi->dev); | 1190 | pm_runtime_put(hdmi->dev); |
1191 | } | 1191 | } |
1192 | 1192 | ||
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index bd4840a8a6b7..bf12e53aed5c 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -912,9 +912,9 @@ static int sh_mobile_release(struct fb_info *info, int user) | |||
912 | 912 | ||
913 | /* Nothing to reconfigure, when called from fbcon */ | 913 | /* Nothing to reconfigure, when called from fbcon */ |
914 | if (user) { | 914 | if (user) { |
915 | acquire_console_sem(); | 915 | console_lock(); |
916 | sh_mobile_fb_reconfig(info); | 916 | sh_mobile_fb_reconfig(info); |
917 | release_console_sem(); | 917 | console_unlock(); |
918 | } | 918 | } |
919 | 919 | ||
920 | mutex_unlock(&ch->open_lock); | 920 | mutex_unlock(&ch->open_lock); |
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index b7dc1800efa9..bcb44a594ebc 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -2010,9 +2010,9 @@ static int sm501fb_suspend_fb(struct sm501fb_info *info, | |||
2010 | 2010 | ||
2011 | /* tell console/fb driver we are suspending */ | 2011 | /* tell console/fb driver we are suspending */ |
2012 | 2012 | ||
2013 | acquire_console_sem(); | 2013 | console_lock(); |
2014 | fb_set_suspend(fbi, 1); | 2014 | fb_set_suspend(fbi, 1); |
2015 | release_console_sem(); | 2015 | console_unlock(); |
2016 | 2016 | ||
2017 | /* backup copies in case chip is powered down over suspend */ | 2017 | /* backup copies in case chip is powered down over suspend */ |
2018 | 2018 | ||
@@ -2069,9 +2069,9 @@ static void sm501fb_resume_fb(struct sm501fb_info *info, | |||
2069 | memcpy_toio(par->cursor.k_addr, par->store_cursor, | 2069 | memcpy_toio(par->cursor.k_addr, par->store_cursor, |
2070 | par->cursor.size); | 2070 | par->cursor.size); |
2071 | 2071 | ||
2072 | acquire_console_sem(); | 2072 | console_lock(); |
2073 | fb_set_suspend(fbi, 0); | 2073 | fb_set_suspend(fbi, 0); |
2074 | release_console_sem(); | 2074 | console_unlock(); |
2075 | 2075 | ||
2076 | vfree(par->store_fb); | 2076 | vfree(par->store_fb); |
2077 | vfree(par->store_cursor); | 2077 | vfree(par->store_cursor); |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index 6913fe168c25..dfef88c803d4 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | /* Why should fb driver call console functions? because acquire_console_sem() */ | 28 | /* Why should fb driver call console functions? because console_lock() */ |
29 | #include <linux/console.h> | 29 | #include <linux/console.h> |
30 | #include <linux/mfd/core.h> | 30 | #include <linux/mfd/core.h> |
31 | #include <linux/mfd/tmio.h> | 31 | #include <linux/mfd/tmio.h> |
@@ -944,7 +944,7 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) | |||
944 | struct mfd_cell *cell = dev->dev.platform_data; | 944 | struct mfd_cell *cell = dev->dev.platform_data; |
945 | int retval = 0; | 945 | int retval = 0; |
946 | 946 | ||
947 | acquire_console_sem(); | 947 | console_lock(); |
948 | 948 | ||
949 | fb_set_suspend(info, 1); | 949 | fb_set_suspend(info, 1); |
950 | 950 | ||
@@ -965,7 +965,7 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) | |||
965 | if (cell->suspend) | 965 | if (cell->suspend) |
966 | retval = cell->suspend(dev); | 966 | retval = cell->suspend(dev); |
967 | 967 | ||
968 | release_console_sem(); | 968 | console_unlock(); |
969 | 969 | ||
970 | return retval; | 970 | return retval; |
971 | } | 971 | } |
@@ -976,7 +976,7 @@ static int tmiofb_resume(struct platform_device *dev) | |||
976 | struct mfd_cell *cell = dev->dev.platform_data; | 976 | struct mfd_cell *cell = dev->dev.platform_data; |
977 | int retval = 0; | 977 | int retval = 0; |
978 | 978 | ||
979 | acquire_console_sem(); | 979 | console_lock(); |
980 | 980 | ||
981 | if (cell->resume) { | 981 | if (cell->resume) { |
982 | retval = cell->resume(dev); | 982 | retval = cell->resume(dev); |
@@ -992,7 +992,7 @@ static int tmiofb_resume(struct platform_device *dev) | |||
992 | 992 | ||
993 | fb_set_suspend(info, 0); | 993 | fb_set_suspend(info, 0); |
994 | out: | 994 | out: |
995 | release_console_sem(); | 995 | console_unlock(); |
996 | return retval; | 996 | return retval; |
997 | } | 997 | } |
998 | #else | 998 | #else |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 289edd519527..4e66349e4366 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -1674,17 +1674,17 @@ static int parse_mode(const char *str, u32 *xres, u32 *yres) | |||
1674 | #ifdef CONFIG_PM | 1674 | #ifdef CONFIG_PM |
1675 | static int viafb_suspend(void *unused) | 1675 | static int viafb_suspend(void *unused) |
1676 | { | 1676 | { |
1677 | acquire_console_sem(); | 1677 | console_lock(); |
1678 | fb_set_suspend(viafbinfo, 1); | 1678 | fb_set_suspend(viafbinfo, 1); |
1679 | viafb_sync(viafbinfo); | 1679 | viafb_sync(viafbinfo); |
1680 | release_console_sem(); | 1680 | console_unlock(); |
1681 | 1681 | ||
1682 | return 0; | 1682 | return 0; |
1683 | } | 1683 | } |
1684 | 1684 | ||
1685 | static int viafb_resume(void *unused) | 1685 | static int viafb_resume(void *unused) |
1686 | { | 1686 | { |
1687 | acquire_console_sem(); | 1687 | console_lock(); |
1688 | if (viaparinfo->shared->vdev->engine_mmio) | 1688 | if (viaparinfo->shared->vdev->engine_mmio) |
1689 | viafb_reset_engine(viaparinfo); | 1689 | viafb_reset_engine(viaparinfo); |
1690 | viafb_set_par(viafbinfo); | 1690 | viafb_set_par(viafbinfo); |
@@ -1692,7 +1692,7 @@ static int viafb_resume(void *unused) | |||
1692 | viafb_set_par(viafbinfo1); | 1692 | viafb_set_par(viafbinfo1); |
1693 | fb_set_suspend(viafbinfo, 0); | 1693 | fb_set_suspend(viafbinfo, 0); |
1694 | 1694 | ||
1695 | release_console_sem(); | 1695 | console_unlock(); |
1696 | return 0; | 1696 | return 0; |
1697 | } | 1697 | } |
1698 | 1698 | ||
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 | } |
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index 3e6934d4bea8..a20218c2fda8 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
@@ -491,12 +491,12 @@ xenfb_make_preferred_console(void) | |||
491 | if (console_set_on_cmdline) | 491 | if (console_set_on_cmdline) |
492 | return; | 492 | return; |
493 | 493 | ||
494 | acquire_console_sem(); | 494 | console_lock(); |
495 | for_each_console(c) { | 495 | for_each_console(c) { |
496 | if (!strcmp(c->name, "tty") && c->index == 0) | 496 | if (!strcmp(c->name, "tty") && c->index == 0) |
497 | break; | 497 | break; |
498 | } | 498 | } |
499 | release_console_sem(); | 499 | console_unlock(); |
500 | if (c) { | 500 | if (c) { |
501 | unregister_console(c); | 501 | unregister_console(c); |
502 | c->flags |= CON_CONSDEV; | 502 | c->flags |= CON_CONSDEV; |