summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-27 05:35:13 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-08-05 14:21:44 +0200
commitb373de3095e7518d62cfc99a1b22da8dc3435a88 (patch)
treefa524e6bdcd3c864508bae20a66e82e005d6ac07 /tests
parent605efd7e05e94b8d9d742d3a8af1040776e2742d (diff)
modetest: Remove the struct connector_arg encoder field
The field is no needed, make it a local variable where used. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/modetest/modetest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index e8f6790d..66745986 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -638,7 +638,6 @@ struct connector_arg {
char format_str[5];
unsigned int fourcc;
drmModeModeInfo *mode;
- drmModeEncoder *encoder;
int crtc;
unsigned int fb_id[2], current_fb_id;
struct timeval start;
@@ -659,6 +658,7 @@ struct plane_arg {
static void connector_find_mode(struct device *dev, struct connector_arg *c)
{
drmModeConnector *connector;
+ drmModeEncoder *encoder;
int i, j;
/* First, find the connector & mode */
@@ -692,16 +692,16 @@ static void connector_find_mode(struct device *dev, struct connector_arg *c)
/* Now get the encoder */
for (i = 0; i < dev->resources->res->count_encoders; i++) {
- c->encoder = dev->resources->encoders[i].encoder;
- if (!c->encoder)
+ encoder = dev->resources->encoders[i].encoder;
+ if (!encoder)
continue;
- if (c->encoder->encoder_id == connector->encoder_id)
+ if (encoder->encoder_id == connector->encoder_id)
break;
}
if (c->crtc == -1)
- c->crtc = c->encoder->crtc_id;
+ c->crtc = encoder->crtc_id;
}
/* -----------------------------------------------------------------------------