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: 10119557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4EB1B6019C for ; Mon, 18 Dec 2017 13:45:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41AE12893D for ; Mon, 18 Dec 2017 13:45:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34B0728943; Mon, 18 Dec 2017 13:45:33 +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=-4.2 required=2.0 tests=BAYES_00, 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 325132893D for ; Mon, 18 Dec 2017 13:45:31 +0000 (UTC) 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" X-Virus-Scanned: ClamAV using ClamSMTP 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)