From d0dbc48f1ba8e4a6b725741a3db4a1d67c703a48 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 28 Apr 2020 11:54:07 -0400 Subject: [PATCH] ecore-drm2: Change _output_crtc_find to accept an int There is no reason to be passing the whole device structure here just to get the fd --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 6fe3eb5770..77123c948a 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -250,7 +250,7 @@ _output_edid_find(Ecore_Drm2_Output *output, const drmModeConnector *conn) } static int -_output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, Ecore_Drm2_Device *dev) +_output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, int fd) { drmModeEncoder *enc; uint32_t crtc; @@ -267,7 +267,7 @@ _output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, Ecore_Drm for (j = 0; j < conn->count_encoders; j++) { - enc = sym_drmModeGetEncoder(dev->fd, conn->encoders[j]); + enc = sym_drmModeGetEncoder(fd, conn->encoders[j]); if (!enc) continue; crtc = enc->crtc_id; @@ -678,7 +678,7 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne if (w) *w = 0; - i = _output_crtc_find(res, conn, dev); + i = _output_crtc_find(res, conn, dev->fd); if (i < 0) return EINA_FALSE; output = calloc(1, sizeof(Ecore_Drm2_Output));