diff options
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 17b189a81ec5..f09c5f17a42f 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -445,7 +445,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) | |||
445 | int ret = 0, i; | 445 | int ret = 0, i; |
446 | struct v4l2_window *win; | 446 | struct v4l2_window *win; |
447 | struct omap_overlay *ovl; | 447 | struct omap_overlay *ovl; |
448 | int posx, posy, outw, outh, temp; | 448 | int posx, posy, outw, outh; |
449 | struct omap_video_timings *timing; | 449 | struct omap_video_timings *timing; |
450 | struct omapvideo_info *ovid = &vout->vid_info; | 450 | struct omapvideo_info *ovid = &vout->vid_info; |
451 | 451 | ||
@@ -468,9 +468,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) | |||
468 | /* Invert the height and width for 90 | 468 | /* Invert the height and width for 90 |
469 | * and 270 degree rotation | 469 | * and 270 degree rotation |
470 | */ | 470 | */ |
471 | temp = outw; | 471 | swap(outw, outh); |
472 | outw = outh; | ||
473 | outh = temp; | ||
474 | posy = (timing->y_res - win->w.width) - win->w.left; | 472 | posy = (timing->y_res - win->w.width) - win->w.left; |
475 | posx = win->w.top; | 473 | posx = win->w.top; |
476 | break; | 474 | break; |
@@ -481,9 +479,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) | |||
481 | break; | 479 | break; |
482 | 480 | ||
483 | case dss_rotation_270_degree: | 481 | case dss_rotation_270_degree: |
484 | temp = outw; | 482 | swap(outw, outh); |
485 | outw = outh; | ||
486 | outh = temp; | ||
487 | posy = win->w.left; | 483 | posy = win->w.left; |
488 | posx = (timing->x_res - win->w.height) - win->w.top; | 484 | posx = (timing->x_res - win->w.height) - win->w.top; |
489 | break; | 485 | break; |