Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3066344pxa; Tue, 18 Aug 2020 05:55:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpeMUH7YoiR1LR9ff9B6oEuueGCLqn0n71XyKmzAUWrm32fc9eGN6EpDyDJQ4XdegBD1UH X-Received: by 2002:a17:907:2115:: with SMTP id qn21mr20873836ejb.157.1597755320498; Tue, 18 Aug 2020 05:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597755320; cv=none; d=google.com; s=arc-20160816; b=Quic16oHVZ4Rrh4gkmG5HMzEvuEhDSHrEJSfKl2VZv9tljCSVP98yDL5GTQ9Y2qPl4 k4wZU39OmCzwk1lUftfTraThFWsFH3GtQVZt7az+zNq/VRTthYCIMhJQNlRfu6w9hjrw udA8pUHt8RUCX8LTx/fhZEDIGj00eiMju8zW2isWnN4j8x55zil76dwpoPXP8xyDvhMT DgLr242reqLIF0P8LrYorbeupA2BspkS/7IlL4AHk0sSYMT4NV9N2rvdLOp8iVXyVVvg w7tpLaD8nHtigy67Rk8zf5oICezUb8tzn852UmuiGMjkh9Fe72rTF9BkM3ofoaoY2obv L1Og== 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=70d6MzVFE450ZOtxfb3ecFgTIMoDTeY1LJJznOix064=; b=jfYDK3PuSFJDBo7hRVi0JoEjMwhZuw4828gITbStJLeRZJMNLJMbleTQkwLF489qH5 h8DCxEiuydXBLuT67MkD7UPJkRT74I52v59LZkglbQq9rW91j8QYzmK+0uoPhlhK0dTZ 6kCjQ0muhmFol5+AzUh/xvN1Xc/d9/65oC2dUxRYxLtx+uCSwP94ZRSzwcKaX2UvQqyw o76r0iU2iq3zQHAWhjSBMNztSHUJEv8ymfnzsmZEKQ1gNvdXwQBs5Qrj8Pf8Ol+FffKA cJwB+KveOgL9Qi7llOcsH076LFSrHXDvM2bC8Xv2sX4Fg3WLm4KUAhIn3YqPPIesqy7c s1Gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e10si13124418edy.274.2020.08.18.05.54.56; Tue, 18 Aug 2020 05:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbgHRMyO (ORCPT + 99 others); Tue, 18 Aug 2020 08:54:14 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51468 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726398AbgHRMyN (ORCPT ); Tue, 18 Aug 2020 08:54:13 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A7AC5CAFD889A27B184B; Tue, 18 Aug 2020 20:54:07 +0800 (CST) Received: from localhost (10.174.179.108) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Tue, 18 Aug 2020 20:53:58 +0800 From: YueHaibing To: , , , , , CC: , , YueHaibing Subject: [PATCH] memory: omap-gpmc: Fix build error without CONFIG_OF Date: Tue, 18 Aug 2020 20:53:38 +0800 Message-ID: <20200818125338.58148-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.174.179.108] 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_OF is n, gcc fails: drivers/memory/omap-gpmc.o: In function `gpmc_omap_onenand_set_timings': omap-gpmc.c:(.text+0x2a88): undefined reference to `gpmc_read_settings_dt' Add helper function to fix this. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: YueHaibing --- drivers/memory/omap-gpmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index ce0e7e2d7cff..332bb4580817 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -1176,6 +1176,7 @@ struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *reg, int cs) } EXPORT_SYMBOL_GPL(gpmc_omap_get_nand_ops); +#ifdef CONFIG_OF static void gpmc_omap_onenand_calc_sync_timings(struct gpmc_timings *t, struct gpmc_settings *s, int freq, int latency) @@ -1280,6 +1281,14 @@ int gpmc_omap_onenand_set_timings(struct device *dev, int cs, int freq, return gpmc_cs_set_timings(cs, &gpmc_t, &gpmc_s); } +#else +int gpmc_omap_onenand_set_timings(struct device *dev, int cs, int freq, + int latency, + struct gpmc_onenand_info *info) +{ + return -EINVAL; +} +#endif EXPORT_SYMBOL_GPL(gpmc_omap_onenand_set_timings); int gpmc_get_client_irq(unsigned int irq_config) -- 2.17.1