From patchwork Tue May 29 11:56:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10435097 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 45800602CC for ; Tue, 29 May 2018 11:57:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35831286FD for ; Tue, 29 May 2018 11:57:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29B90286FF; Tue, 29 May 2018 11:57:38 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9FEF286FD for ; Tue, 29 May 2018 11:57:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933415AbeE2L5g (ORCPT ); Tue, 29 May 2018 07:57:36 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8201 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933395AbeE2L5f (ORCPT ); Tue, 29 May 2018 07:57:35 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2E20C4A1DA19E; Tue, 29 May 2018 19:57:20 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.382.0; Tue, 29 May 2018 19:57:12 +0800 From: YueHaibing To: , , CC: , , , , , YueHaibing Subject: [PATCH net-next] net: davinci_mdio: fix building error without CONFIG_OF Date: Tue, 29 May 2018 19:56:51 +0800 Message-ID: <20180529115651.3420-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP gcc report a build error when compiling without CONFIG_OF drivers/net/ethernet/ti/davinci_mdio.c: In function ‘davinci_mdio_probe’: drivers/net/ethernet/ti/davinci_mdio.c:380:9: error: implicit declaration of function ‘davinci_mdio_probe_dt’ [-Werror=implicit-function-declaration] ret = davinci_mdio_probe_dt(&data->pdata, pdev); ^ Fixes: 9eae9c7d0875 ("drivers: net: davinci_mdio: enable pm runtime auto for ti cpsw-mdio") Signed-off-by: YueHaibing --- drivers/net/ethernet/ti/davinci_mdio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index 8ac7283..6e544d9 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -339,9 +339,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data, return 0; } -#endif -#if IS_ENABLED(CONFIG_OF) static const struct davinci_mdio_of_param of_cpsw_mdio_data = { .autosuspend_delay_ms = 100, }; @@ -352,6 +350,12 @@ static const struct of_device_id davinci_mdio_of_mtable[] = { { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable); +#else +static int davinci_mdio_probe_dt(struct mdio_platform_data *data, + struct platform_device *pdev) +{ + return -EINVAL; +} #endif static int davinci_mdio_probe(struct platform_device *pdev)