diff options
Diffstat (limited to 'drivers/video/ps3fb.c')
-rw-r--r-- | drivers/video/ps3fb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 815b3cc78fd3..dd6dd6e222d7 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -680,13 +680,10 @@ EXPORT_SYMBOL_GPL(ps3fb_wait_for_vsync); | |||
680 | 680 | ||
681 | void ps3fb_flip_ctl(int on) | 681 | void ps3fb_flip_ctl(int on) |
682 | { | 682 | { |
683 | if (on) { | 683 | if (on) |
684 | if (atomic_read(&ps3fb.ext_flip) > 0) { | 684 | atomic_dec_if_positive(&ps3fb.ext_flip); |
685 | atomic_dec(&ps3fb.ext_flip); | 685 | else |
686 | } | ||
687 | } else { | ||
688 | atomic_inc(&ps3fb.ext_flip); | 686 | atomic_inc(&ps3fb.ext_flip); |
689 | } | ||
690 | } | 687 | } |
691 | 688 | ||
692 | EXPORT_SYMBOL_GPL(ps3fb_flip_ctl); | 689 | EXPORT_SYMBOL_GPL(ps3fb_flip_ctl); |
@@ -786,8 +783,7 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd, | |||
786 | 783 | ||
787 | case PS3FB_IOCTL_OFF: | 784 | case PS3FB_IOCTL_OFF: |
788 | DPRINTK("PS3FB_IOCTL_OFF:\n"); | 785 | DPRINTK("PS3FB_IOCTL_OFF:\n"); |
789 | if (atomic_read(&ps3fb.ext_flip) > 0) | 786 | atomic_dec_if_positive(&ps3fb.ext_flip); |
790 | atomic_dec(&ps3fb.ext_flip); | ||
791 | retval = 0; | 787 | retval = 0; |
792 | break; | 788 | break; |
793 | 789 | ||