aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-05-18 13:54:17 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-06 06:32:03 -0400
commitcc1821964d122c39a80e653163513f11ccc39524 (patch)
treede941f92cb93a8a6b0e62368c9ca2e96961f129a
parent4aed283c0f7c2b60dc211d2ab8966b3e8c0dddf7 (diff)
[media] omap_vout: use swap() in omapvid_init()
Use kernel.h macro definition. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/platform/omap/omap_vout.c10
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;