From patchwork Mon Dec 18 13:44:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122215 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2852274qgn; Mon, 18 Dec 2017 05:45:32 -0800 (PST) X-Google-Smtp-Source: ACJfBounwBkLS6minsvzIWHo0xtx6LTdJUsqUUQiwe37eEt0Ty7h+fuWg0QPxD0FQH2BiOsdqUqm X-Received: by 10.159.240.135 with SMTP id p7mr22275107plr.203.1513604731865; Mon, 18 Dec 2017 05:45:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513604731; cv=none; d=google.com; s=arc-20160816; b=zCDgMBv8uHN1S2UMO4s+JfydhrqlsLpcnFnudqdo+66rxQ07OvH5lgLdQVX4mZlAQD mLGwRQWyfVVZ/8MPE05UUUGmu095WpAwlAl89ZL/0CRzQZnNsI9wZUyvDyMcsPZGoQt4 TItY6ANrRjFQn0/89tjizdo8QKuk8havO7mtJgGDkXV5MUiC7qXyzXy3HzMIOGTMNAWV Q2+WrBaXFjvhw12Z4j4OzMln1HRUfQud/70KrnHwbXKoo9XH2lA1WtF15YgNz1q9Oqll 30QfarRJV0/uOLiBxI4l9FKUI6DBMdQzwKGYmS3x3kVqGIL4kr6nOET45qRGadBFxNQR sGmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=NH/P3cft7gSZkxp8JOPpj6lPVQmKI4gXYZscvEK/G4g=; b=rKQ886Rpl9JWYoyQQkyLB2AnX+nWssoCqARJbj9e2I3ZC1XY8FlsIJ6MRSJZWrruS3 KJGiSfDtOnaeHRx7KaHKFLTGonwtxpgdXeYhNtPd/JFNK2+Ffis46Ey9KxuKaXSJEpnn qiJ1Wdg4oYqiImF9qQ/YJmchdR4LieU90NDF4S/s6dcuylz2Vg7mEiCSwNiBOTQvoQf8 e9Vjf/Rn79AykmrgL4IQedWM66C3TdamiMqQP1kpx3Naz0xenUNnESg4I4xJYfjrB+bn SL25DGxcV+DUmoQ53mxhGlmLqflLo7GVzhJw2kzO6aBjX6wiLEifArShDtfNFzVO1eiI r98Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id u17si9398287plj.625.2017.12.18.05.45.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 05:45:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C1A889147; Mon, 18 Dec 2017 13:45:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id E13D589C89 for ; Mon, 18 Dec 2017 13:45:27 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lr6Nr-1eumZ8095v-00ea4Y; Mon, 18 Dec 2017 14:45:21 +0100 From: Arnd Bergmann To: Thierry Reding , David Airlie , Jonathan Hunter Subject: [PATCH] drm/tegra: fix non-debugfs builds Date: Mon, 18 Dec 2017 14:44:46 +0100 Message-Id: <20171218134519.3042726-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:eonALH5OWfTgg5iDbrcmrprgT+Jm8gqK0iMo23uRWPKTJ2/8Oll 1r4wNuqtyof7wTUWNVr/dbmM0vehOiXY5D9Jp4Vkmgc/AktqI0hl65bXyy2+TTIvW6qGH6O 6aye44vv9pjFy2ppWoBOw3/N5dE1GgBFj13w5wypYSigEE9qYMia+AqumLEX1Nkl2xQw6ut QUXyc1489y/eiyl8AVXCg== X-UI-Out-Filterresults: notjunk:1; V01:K0:t2K6+yhOGPE=:W9eobkeCkOv7fI1rQ3QPAV 3g5drbPAcgcFqzTYpNDHFb3S4Xzkt9AFkrMnstKWmTGvXZd1qJuRWqyJIOyCt3UXeZyuQjIco l3cp10gn65KqCjlOaf/MeUJ/ZJeLWsZNcPFZPtJyMrqsBgEVBovLZm9TVIJ/eCTxN8qkaDpOC Fad1D1yHgruOesYNNp/7tSUDxifV90NtnPOuPVpcw5AJagjRP6QZ1fWHEWLhgWI7B7Dm61Iws rxBHivEimPDDz2FhSIiDgtuh4giL8KzlEGMU+vul2nNWSpI7TIw0sSA3bfx/u/wmISTe9rI7q 5zV0tAIm4nrycBVOI1S9d9ribGa34A1pCY0/KgTc0sYxf5gcw+mMUg8DvlLSnms5mjafxG+4Q FmFRuUn0FX+1kFPJGVuPoCFhroWBN+yjtwP2twXciDLfQ0zh7RO561JJAEQDXJCMCDkYOa6u7 yvkVXwXNhYIsWJZWfSUEWbLQ5kxOyDnC06VPl8Trer5w6IAocit3x2LVSGlSgMex36pMNcdyt ATu7TEVuvPa8/elOhdHAYL0m2CtNOhqXuNFbqGHyMgIWqOGDHiW9N0noCe9Sky5f8hiZU3cOa C42aJevTBFe2NfMak5UTDpFHns8p/0b4pUQ98RqK3iQxJLa9VV26ijqG565BrzH70DX6PpRjQ gJxwtaJ4CXv/s6rIickEOGydMxgFjBKkmJe3qRdfv+RVops21UCRetqrspSG9gxhO3sFyNHk2 yZkF2+B8fdvvWoMaUiBjvzwIzlXSiK1aJL3saw== Cc: linux-tegra@vger.kernel.org, Daniel Vetter , dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The new debugfs registration fails to build when CONFIG_DEBUGFS is disabled, because the drm_crtc structure is lacking a member in that configuration: drivers/gpu/drm/tegra/dc.c: In function 'tegra_dc_late_register': drivers/gpu/drm/tegra/dc.c:1204:28: error: 'struct drm_crtc' has no member named 'debugfs_entry' Without CONFIG_DEBUGFS, the rest of the function already degrades into nothing, so we just avoid the one assignment. Fixes: b95800eeef09 ("drm/tegra: dc: Register debugfs in ->late_register()") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/tegra/dc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index e963e40d8a25..e8a0cad5899c 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -1201,10 +1201,16 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) { unsigned int i, count = ARRAY_SIZE(debugfs_files); struct drm_minor *minor = crtc->dev->primary; - struct dentry *root = crtc->debugfs_entry; + struct dentry *root; struct tegra_dc *dc = to_tegra_dc(crtc); int err; +#ifdef CONFIG_DEBUG_FS + root = crtc->debugfs_entry; +#else + root = NULL; +#endif + dc->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!dc->debugfs_files)