Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2094518ybp; Sat, 12 Oct 2019 04:05:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqCIu3vr56jloQ62uNXcWOjghUgygdPDptvS2lFWaQzSuOdVYseLz+HZh/u8EQIaumYK7R X-Received: by 2002:a17:906:e89:: with SMTP id p9mr18373012ejf.95.1570878337852; Sat, 12 Oct 2019 04:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570878337; cv=none; d=google.com; s=arc-20160816; b=mX8So5WTH9WzBzzoW51KVY+cUQkaLlK15/vgLNxDPipJx0rWF8n2q+zRzCGGmhXT6t UppGzxOurKVyA4wBoYWqrgGbI+yfydjIQq1PNUfM3EYSofbU9/66lQGh+POuhtfKAMma JPzoNkZQR0NLqfcisE499cJwsoBOxeJT0aM/NdpRhPD/6A1bvCnOsrMNny/aBoI0ySPD iF7y6cfr0ksbLfAX/j9fra4nd6vdxVKHXPZxzxNJwCTMHLv01rMjLCQnTD8FbA0J0Cic QNgXwpG3xo+RDtuJuYAXYEH134VOTn5l5/9wVa+lwkKYqnHOkJM/as4SxCxvd7LNN1Yf H6Aw== 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=RIzmtVImqs78BKKPGrlnug3nx2fe2waOAOk0I99vi0Q=; b=ID00KE0XyNZQWq3LKAlRM+fWTihqCHZMRxVa17yv/ws8H5XbzSDeu3/Lfr/oMXQZ96 juSgNqdn9oUOYwGXZGAbVLys0u/8G/go1dZCBLtht0GlFuNJH7ZyVxDZMPEXb9YgNJU7 3fYLFewqgRsAHUcjTu0x38qOuWAw8ar8nVxg2aoDoWPfbb0s8DKPewMqh9EiB2HpPIBE J+S1Ote0fzCNh/TEA18cpuVd6W0vYET/cbfLqNUgRJz5wZF3UyTYlbaVS97rAJUvVeP1 GxuRKmHAty3zad0cE1bKqP2OV7lVUpnFP+yPaQLkt/ougWLpCRlVtErC6TXfwvZmwhU6 q7nQ== 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 j12si7182023ejx.282.2019.10.12.04.05.12; Sat, 12 Oct 2019 04:05:37 -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 S1729125AbfJLK6o (ORCPT + 99 others); Sat, 12 Oct 2019 06:58:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3742 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726793AbfJLK6o (ORCPT ); Sat, 12 Oct 2019 06:58:44 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 17DDA52DD7ACBD57E359; Sat, 12 Oct 2019 18:58:38 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Sat, 12 Oct 2019 18:58:34 +0800 From: zhong jiang To: CC: , Subject: [PATCH v3] staging: wfx: fix an undefined reference error when CONFIG_MMC=m Date: Sat, 12 Oct 2019 18:54:53 +0800 Message-ID: <1570877693-52711-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I hit the following error when compile the kernel. drivers/staging/wfx/main.o: In function `wfx_core_init': /home/z00352263/linux-next/linux-next/drivers/staging/wfx/main.c:488: undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o: In function `wfx_core_exit': /home/z00352263/linux-next/linux-next/drivers/staging/wfx/main.c:496: undefined reference to `sdio_unregister_driver' drivers/staging/wfx/main.o:(.debug_addr+0x1a8): undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o:(.debug_addr+0x6f0): undefined reference to `sdio_unregister_driver' Signed-off-by: zhong jiang --- v2->v3: We'd better not use #ifdef in .c file to use IS_ENABLED instead. v1->v2: We should prefer to current dependencies rather than force to enable. drivers/staging/wfx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile index 0d9c1ed..77d68b7 100644 --- a/drivers/staging/wfx/Makefile +++ b/drivers/staging/wfx/Makefile @@ -19,6 +19,6 @@ wfx-y := \ sta.o \ debug.o wfx-$(CONFIG_SPI) += bus_spi.o -wfx-$(subst m,y,$(CONFIG_MMC)) += bus_sdio.o +wfx-$(CONFIG_MMC) += bus_sdio.o obj-$(CONFIG_WFX) += wfx.o -- 1.7.12.4