From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-media@vger.kernel.org
Subject: [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init()
Date: Mon, 18 May 2015 19:54:17 +0200 [thread overview]
Message-ID: <1431971658-20986-1-git-send-email-fabf@skynet.be> (raw)
Use kernel.h macro definition.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/media/platform/omap/omap_vout.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
index 17b189a..f09c5f1 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)
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;
--
2.4.0
next reply other threads:[~2015-05-18 17:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 17:54 Fabian Frederick [this message]
2015-05-18 18:20 ` [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init() Vaibhav Hiremath
2015-05-18 18:31 ` Fabian Frederick
2015-05-19 4:50 ` Vaibhav Hiremath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431971658-20986-1-git-send-email-fabf@skynet.be \
--to=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.