From patchwork Thu Oct 18 20:07:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 10648049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 788921057 for ; Thu, 18 Oct 2018 20:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69FB528D87 for ; Thu, 18 Oct 2018 20:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E2E628DF7; Thu, 18 Oct 2018 20:08:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2B84628D87 for ; Thu, 18 Oct 2018 20:08:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C478C6E0F4; Thu, 18 Oct 2018 20:07:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD1946E0F2 for ; Thu, 18 Oct 2018 20:07:51 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id 63-v6so34996405wra.11 for ; Thu, 18 Oct 2018 13:07:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wNdp1wTYK6AbOs6zKReL6zfkkJVC6yBbJtIhY1/a+ZU=; b=PnZbeLH6/l245rUXznE6nk3x3nOv0FZnDAQ0p0pB2XjrGCX0sC/2JLeiJ4XjdIDWk7 pRLVbV0BGmnBoKWwpqWwwYP+tZAlm5cyUmU5dTXf/Kbf9mH0NiJ/nxoyjY3eRbSBz7Ua 7aTgN3kkRZPs2HEnjNoXt7qiKHU/Dci4EzJ3rTEm8qgXN/aijv8J7Cweou6FOdo55ZRb 7UVln8l5iLJPgukVvfhFYh87fgUQjRYiw2Y93XgjX6w8XBgETdskcM3xrehPIzjTpAYH tZ64g62KwBY+myzFX2Kp2iR60WuKyKNYEf1XSI06mJL74PuBt+e4HgjHvN4id1fL6ZuL BOvw== X-Gm-Message-State: ABuFfohibQKABIcbaucwj7RSAGF0QN/SYj2+N17Co+T+0ldmKbGlrAvi /vlZxajouQszsLFXXkzB1z+qHVEe X-Google-Smtp-Source: ACcGV61/KvSNbS2N5UcBycmn0cuZJv3HDnkXOexFv2bfzzAfJ/wsI0ppe/MlU0HBuirGa1Aa0hERWw== X-Received: by 2002:adf:8523:: with SMTP id 32-v6mr31636680wrh.72.1539893270212; Thu, 18 Oct 2018 13:07:50 -0700 (PDT) Received: from localhost.localdomain (2a02-8389-4001-7200-e872-03a0-bb8d-7d2e.cable.dynamic.v6.surfer.at. [2a02:8389:4001:7200:e872:3a0:bb8d:7d2e]) by smtp.gmail.com with ESMTPSA id h82-v6sm648663wmf.14.2018.10.18.13.07.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 13:07:49 -0700 (PDT) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 1/2] xf86drm: fallback to DRIVER uevent entry when OF_FULLNAME fails Date: Thu, 18 Oct 2018 22:07:36 +0200 Message-Id: <20181018200737.5953-2-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181018200737.5953-1-christian.gmeiner@gmail.com> References: <20181018200737.5953-1-christian.gmeiner@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emil.l.velikov@gmail.com, lukas@mntmn.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Christian Gmeiner --- xf86drm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 10df682b..4ee1337b 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -3516,6 +3516,8 @@ static int drmParsePlatformBusInfo(int maj, int min, drmPlatformBusInfoPtr info) snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min); name = sysfs_uevent_get(path, "OF_FULLNAME"); + if (!name) + name = sysfs_uevent_get(path, "DRIVER"); if (!name) return -ENOENT;