]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[media] omap_vout: use swap() in omapvid_init()
authorFabian Frederick <fabf@skynet.be>
Mon, 18 May 2015 17:54:17 +0000 (14:54 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 6 Jun 2015 10:32:03 +0000 (07:32 -0300)
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>
drivers/media/platform/omap/omap_vout.c

index 17b189a81ec597ccbc2d470247155c27bcd00848..f09c5f17a42f35a37e7b4ae80eb746c98f9a755b 100644 (file)
@@ -445,7 +445,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
        int ret = 0, i;
        struct v4l2_window *win;
        struct omap_overlay *ovl;
-       int posx, posy, outw, outh, temp;
+       int posx, posy, outw, outh;
        struct omap_video_timings *timing;
        struct omapvideo_info *ovid = &vout->vid_info;
 
@@ -468,9 +468,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
                        /* Invert the height and width for 90
                         * and 270 degree rotation
                         */
-                       temp = outw;
-                       outw = outh;
-                       outh = temp;
+                       swap(outw, outh);
                        posy = (timing->y_res - win->w.width) - win->w.left;
                        posx = win->w.top;
                        break;
@@ -481,9 +479,7 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
                        break;
 
                case dss_rotation_270_degree:
-                       temp = outw;
-                       outw = outh;
-                       outh = temp;
+                       swap(outw, outh);
                        posy = win->w.left;
                        posx = (timing->x_res - win->w.height) - win->w.top;
                        break;