Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3370961ybi; Fri, 5 Jul 2019 06:19:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTOtSfPDdE/f4CxeN/oq/jW2TDcXKqItZvSZ3hwqfaBQgdN6MPp91wkrRabVABtN71ttWv X-Received: by 2002:a63:188:: with SMTP id 130mr5464834pgb.231.1562332741700; Fri, 05 Jul 2019 06:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562332741; cv=none; d=google.com; s=arc-20160816; b=AdJAxp2WHi3rc6K9wJGctweLqsK8DJSDEfKfyx2mDmR8UwhVD59EndVOEeonqUN6JI OKuuykBJFl5NaBYdAzMHBL1VX2acXiE3E/2NMjDenntr0adtktYrpVEX7lxqAaZWJYN/ rhBtwQfcADW72LXsxnt1k46a9Ed0I1OBzYOqmLHYngM9xyMfcxjQea+w2peAigNSGqc3 RXnUk0LUEE/rBbm5rX8c9DEPFhehX8MZibMGvv+035BvSkBiBRCtTge3xSDx++F3Wgua F8fyKWkUM0aAYZhDBf5nL/zS9s5Q+R/cvBti1PuIp0S0dswozGJnOnl7ozfiaCnKuU6D kDQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=4p/XSseG8smsW6r/eJ9Jvcj4Z/2TiT25WR8sIJVlZi8=; b=S5b//bU2Dpn6JM8Y9tN/WRCLyVDq13RaQok/law+lKVGndVXxc/0UAjuzWvjV0YHDQ QjyTCXIgFRiEhVyY9XGq3QNgcwEzIlP9IMSoBxyo4cVNLBTOhD0Wfa7zMEFQ19KbyTYf LwPfreMOwI8CZ7fI3mUzcJFtPjdRAg+T0BbG+vhoX+mQfLQbVn4RxFFxeCFPIkZwmLNh tSYxzrP7PIzllGZS3rfRG03FjzvrRw/9Y4R2c1pkbHJTOCcLI4H65N4/3OOWQuogG5v4 dMChPIsBLhJDRkjEvHV+yxSikqqrYuYs87KboU0YW+u7lNnC7AmdYlTLBMwbNU+zwdMT rQEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2si9666480pff.221.2019.07.05.06.18.45; Fri, 05 Jul 2019 06:19:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728718AbfGEMen (ORCPT + 99 others); Fri, 5 Jul 2019 08:34:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8713 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727341AbfGEMem (ORCPT ); Fri, 5 Jul 2019 08:34:42 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3A8D35FA08B773A96C8F; Fri, 5 Jul 2019 20:34:38 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Fri, 5 Jul 2019 20:34:28 +0800 From: YueHaibing To: , , , CC: , , , YueHaibing Subject: [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS Date: Fri, 5 Jul 2019 20:32:20 +0800 Message-ID: <20190705123220.54008-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_DEBUG_FS is not set, building fails: drivers/gpio/gpio-tegra.c: In function tegra_gpio_probe: drivers/gpio/gpio-tegra.c:665:2: error: implicit declaration of function debugfs_create_file; did you mean bus_create_file? [-Werror=implicit-function-declaration] debugfs_create_file("tegra_gpio", 0444, NULL, tgi, ^~~~~~~~~~~~~~~~~~~ bus_create_file drivers/gpio/gpio-tegra.c:666:9: error: tegra_dbg_gpio_fops undeclared (first use in this function); did you mean tegra_gpio_pm_ops? &tegra_dbg_gpio_fops); ^~~~~~~~~~~~~~~~~~~ tegra_gpio_pm_ops Reported-by: Hulk Robot Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation") Signed-off-by: YueHaibing --- drivers/gpio/gpio-tegra.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 59b99d8..40fd6bd 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -662,8 +662,10 @@ static int tegra_gpio_probe(struct platform_device *pdev) } } +#ifdef CONFIG_DEBUG_FS debugfs_create_file("tegra_gpio", 0444, NULL, tgi, &tegra_dbg_gpio_fops); +#endif return 0; } -- 2.7.4