From patchwork Mon Feb 26 09:49:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10241805 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 6CA09602DC for ; Mon, 26 Feb 2018 09:49:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59A4129A98 for ; Mon, 26 Feb 2018 09:49:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CEF329EC8; Mon, 26 Feb 2018 09:49:51 +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 CACFB29A98 for ; Mon, 26 Feb 2018 09:49:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0908D6E407; Mon, 26 Feb 2018 09:49:49 +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.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id D1B686E407; Mon, 26 Feb 2018 09:49:47 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0MhrpH-1f2XV04Bwx-00MuKR; Mon, 26 Feb 2018 10:49:42 +0100 From: Arnd Bergmann To: Rob Clark , Jordan Crouse Subject: [PATCH] drm/msm: fix building without debugfs Date: Mon, 26 Feb 2018 10:49:26 +0100 Message-Id: <20180226094941.2783405-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:kkfEgG/0yDhC6Ll1DSQYMwQSd2hVPBgQve1rK8+WNb9L2bn036O 7ZaWW+T5I7J/1JnhrnWYaVOc8dcaF/yb4+NYIosfZyEqK5AP8oJq3Rxh13GKGDiUuczkCmJ irXH5FkOhDrtaR3TzI+Sa5JuWiWSiAsJsfaTIwkcuBuNHxIq0i49aDLdBo7hXexdbThklCk OLEEutuxGBR0a4EArrueg== X-UI-Out-Filterresults: notjunk:1; V01:K0:IgcO1iWzomg=:dWle4ckDBmPdeSy2QqCW3i kLzfIHc5I/B4mu85XQi4pydmfwv5VPb+XlCFQsgGrQJN7Vk1FlpMSx5pPZ/wITKF6wwzTf4dQ hvwJANmI6zVpVSsgld5RXr0iyf/GQXpkOaFunfcCaWh9W6dmW9rHze3K4lWzpqiKXF3dc+Kw+ Si9hRI0P6ini8EP1VeVegnKJFUCCc2Kjv3cbPUfR0C+HXdHMFhN5cGnSG4FLt59qEjfKvTUpa rKIPrh8Z2pAHJ0qbGyKp+uyjTrXZmHdGfqrjbEbfCnctElsHHHl1oRVYo5Na1/pImYmTv/mJR 5WpMq3BFSOGg94BLqRJSV2yoA2ZJQa1TB38TaG9VhUoQyMkLbPQevZfgmMBEEC5Gi0uO/WOal kH4Q3i88SlnEPwmAcTTJ08bANrhJdJwd//nuFBTt/zmmknE4RvH/qRxJyCwAnDoVRsGUoSkLJ TAs2U5rFM1afsie9pscpAlaXT0ApCSikoGhcjK6x3uL3MM9qFM7mJjCAySXDbSiw1w/qPhmdv 7hcnbcpaW0K1Ab5JKNLBawalXAKkTySBUOJtm2ChRj09aFjwQaFVeXoP+OMrhBz9IB6mPmh9R kSzSbuVCFFtgbrEHj+SSjvwX+8V+kJtLNurRCWuiKH2yIEUnq+NRIygajLigIJ4sUnwp0igF2 vED7mUmluR3MOf+Dj7/OqYzVDepTzjuUOj8clmJvXkZ27ehmUFb3CNY2qEdNM8esU8vPzDfpk 19hW5QApHRluSB/pktfN9fcIth3H50qTFgfumg== 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: Arnd Bergmann , David Airlie , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , freedreno@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The adreno driver stopped building when CONFIG_DEBUGFS is disabled: drivers/gpu/drm/msm/adreno/adreno_device.c: In function 'adreno_load_gpu': drivers/gpu/drm/msm/adreno/adreno_device.c:153:16: error: 'const struct msm_gpu_funcs' has no member named 'debugfs_init' if (gpu->funcs->debugfs_init) { ^~ drivers/gpu/drm/msm/adreno/adreno_device.c:154:13: error: 'const struct msm_gpu_funcs' has no member named 'debugfs_init' gpu->funcs->debugfs_init(gpu, dev->primary); ^~ This adds an #ifdef around the code that references the hidden pointer. Fixes: 331dc0bc195b ("drm/msm: add a5xx specific debugfs") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index f07d3ec7d77b..8e0cb161754b 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -164,11 +164,13 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev) return NULL; } +#ifdef CONFIG_DEBUG_FS if (gpu->funcs->debugfs_init) { gpu->funcs->debugfs_init(gpu, dev->primary); gpu->funcs->debugfs_init(gpu, dev->render); gpu->funcs->debugfs_init(gpu, dev->control); } +#endif return gpu; }