devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d0dbc48f1ba8e4a6b725741a3db4a1d67c703a48

commit d0dbc48f1ba8e4a6b725741a3db4a1d67c703a48
Author: Christopher Michael <[email protected]>
Date:   Tue Apr 28 11:54:07 2020 -0400

    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));

-- 


Reply via email to