summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-01-14 15:47:48 +0100
committerHans de Goede <hdegoede@redhat.com>2014-03-03 08:13:55 +0100
commitd9a4059d400bf288aadd17c04885cb9b0fb93989 (patch)
treef939f22c5b767cc7b11299b64196df1fe2da27d9 /config
parent687afa3f6475060e6c460aa9496ba1a6a7982102 (diff)
config-udev: Don't try to add drm devices twice
Before this commit we were trying to add most drm devices twice, once from xf86platformProbe() and once from config_udev_init(). This results in somewhat confusing messages in Xorg.log, ie: (II) xfree86: Adding drm device (/dev/dri/card0) Later followed by: (II) config/udev: Adding drm device (/dev/dri/card0) By filtering out duplicate drm devices we avoid these confusing messages. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'config')
-rw-r--r--config/udev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/udev.c b/config/udev.c
index 208518572..d70eeb48c 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -112,6 +112,10 @@ device_added(struct udev_device *udev_device)
if (strncmp(sysname, "card", 4) != 0)
return;
+ /* Check for devices already added through xf86platformProbe() */
+ if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum)))
+ return;
+
LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path);
config_udev_odev_setup_attribs(path, syspath, major(devnum),