From 54fede47a9f2984e379cf64ef36beed31bd0c903 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 10 Jan 2018 12:54:42 -0600 Subject: [PATCH] ecore_drm2: simplify device selection code The platform check was added for systems (like ARM) that don't generally have PCI graphics devices. However, now we pick a fallback device that doesn't have a PCI constraint, so the platform check should no longer be necessary. --- src/lib/ecore_drm2/ecore_drm2_device.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index dea67b1ab3..e04f0d38d8 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -97,7 +97,6 @@ _drm2_device_find(Elput_Manager *em, const char *seat) Eina_List *devs, *l; const char *dev, *ret = NULL, *chosen_dev = NULL; Eina_Bool found = EINA_FALSE; - Eina_Bool platform = EINA_FALSE; Eina_Bool modeset; int fd; @@ -130,28 +129,16 @@ _drm2_device_find(Elput_Manager *em, const char *seat) chosen_dev = dev; dparent = eeze_udev_syspath_get_parent_filtered(dev, "pci", NULL); - if (!dparent) - { - dparent = - eeze_udev_syspath_get_parent_filtered(dev, "platform", NULL); - platform = EINA_TRUE; - } - if (dparent) { - if (!platform) - { - const char *id; + const char *id; - id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga"); - if (id) - { - if (!strcmp(id, "1")) found = EINA_TRUE; - eina_stringshare_del(id); - } + id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga"); + if (id) + { + if (!strcmp(id, "1")) found = EINA_TRUE; + eina_stringshare_del(id); } - else - found = EINA_TRUE; eina_stringshare_del(dparent); }