提交 cc182196 编写于 作者: F Fabian Frederick 提交者: Mauro Carvalho Chehab

[media] omap_vout: use swap() in omapvid_init()

Use kernel.h macro definition.
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 4aed283c
...@@ -445,7 +445,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) ...@@ -445,7 +445,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
int ret = 0, i; int ret = 0, i;
struct v4l2_window *win; struct v4l2_window *win;
struct omap_overlay *ovl; struct omap_overlay *ovl;
int posx, posy, outw, outh, temp; int posx, posy, outw, outh;
struct omap_video_timings *timing; struct omap_video_timings *timing;
struct omapvideo_info *ovid = &vout->vid_info; struct omapvideo_info *ovid = &vout->vid_info;
...@@ -468,9 +468,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) ...@@ -468,9 +468,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
/* Invert the height and width for 90 /* Invert the height and width for 90
* and 270 degree rotation * and 270 degree rotation
*/ */
temp = outw; swap(outw, outh);
outw = outh;
outh = temp;
posy = (timing->y_res - win->w.width) - win->w.left; posy = (timing->y_res - win->w.width) - win->w.left;
posx = win->w.top; posx = win->w.top;
break; break;
...@@ -481,9 +479,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) ...@@ -481,9 +479,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
break; break;
case dss_rotation_270_degree: case dss_rotation_270_degree:
temp = outw; swap(outw, outh);
outw = outh;
outh = temp;
posy = win->w.left; posy = win->w.left;
posx = (timing->x_res - win->w.height) - win->w.top; posx = (timing->x_res - win->w.height) - win->w.top;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册