Commit cf99289d authored by Fabian Frederick's avatar Fabian Frederick Committed by Dmitry Torokhov

Input: cyttsp4 - use swap() in cyttsp4_get_touch()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent c7a4fb53
...@@ -775,7 +775,6 @@ static void cyttsp4_get_touch(struct cyttsp4_mt_data *md, ...@@ -775,7 +775,6 @@ static void cyttsp4_get_touch(struct cyttsp4_mt_data *md,
struct device *dev = &md->input->dev; struct device *dev = &md->input->dev;
struct cyttsp4_sysinfo *si = md->si; struct cyttsp4_sysinfo *si = md->si;
enum cyttsp4_tch_abs abs; enum cyttsp4_tch_abs abs;
int tmp;
bool flipped; bool flipped;
for (abs = CY_TCH_X; abs < CY_TCH_NUM_ABS; abs++) { for (abs = CY_TCH_X; abs < CY_TCH_NUM_ABS; abs++) {
...@@ -790,9 +789,7 @@ static void cyttsp4_get_touch(struct cyttsp4_mt_data *md, ...@@ -790,9 +789,7 @@ static void cyttsp4_get_touch(struct cyttsp4_mt_data *md,
} }
if (md->pdata->flags & CY_FLAG_FLIP) { if (md->pdata->flags & CY_FLAG_FLIP) {
tmp = touch->abs[CY_TCH_X]; swap(touch->abs[CY_TCH_X], touch->abs[CY_TCH_Y]);
touch->abs[CY_TCH_X] = touch->abs[CY_TCH_Y];
touch->abs[CY_TCH_Y] = tmp;
flipped = true; flipped = true;
} else } else
flipped = false; flipped = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment