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;
 
                        /* 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;
                        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;