From patchwork Sat Sep 23 01:47:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 9967373 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 DEFFE6020C for ; Sat, 23 Sep 2017 01:47:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEEE7285A0 for ; Sat, 23 Sep 2017 01:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC953283AD; Sat, 23 Sep 2017 01:47:33 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 36D7B28502 for ; Sat, 23 Sep 2017 01:47:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752550AbdIWBrc (ORCPT ); Fri, 22 Sep 2017 21:47:32 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58436 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752542AbdIWBrb (ORCPT ); Fri, 22 Sep 2017 21:47:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1lSvzjn4X3OPw+VeOLM/k2PH8z0prfDMCPGFdKCpiv0=; b=HZ81NKaWakwyPJ8fMNwe5jiuiJ OSIZm+3rsSoOWJk1wNoo4j/qJosQjHh1n4lQ3CRajYzxXcD7080uZwvtfe6YhDZwGZsRFuuSG5J8v BX+7o21ht2RA60+Eerjakf70gGNTc4LJHOZfIpTadr5s4ZHHLjXGAc9AoI3fv/4Z37X0CbeHUFZbV XzqCLBqHO4arf2yBt8RImhah6cdGvF5GwyVDECzwLaSXRTv2yzLeqE+rw2x4G1QUplctXQ/A4jZuZ ww0WJ7RdGw1wTyg9kVuLnzfs6KYJfpBXGb5bq1Qut/H6NjlfwA5WrIJ2DjY8C5oadJTOgFceK+Rxl N4p8mW2g==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlap) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dvZXS-0008Kj-Si; Sat, 23 Sep 2017 01:47:27 +0000 To: LKML , linux-spi@vger.kernel.org, Mark Brown Cc: Baolin Wang From: Randy Dunlap Subject: [PATCH v2] spi: fix spi-sprd-adi build errors when HWSPINLOCK=m and SPI_SPRD_ADI=y Message-ID: <38b3774a-96b0-fc1d-5e91-e1665cb8c076@infradead.org> Date: Fri, 22 Sep 2017 18:47:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Fix build errors when CONFIG_HWSPINLOCK=m and SPI_SPRD_ADI=y. That combination is not allowed. This allows building with HWSPINLOCK and SPI_SPRD_ADI in any combinations except for HWSPINLOCK=m and SPI_SPRD_ADI=y. drivers/spi/spi-sprd-adi.o: In function `sprd_adi_remove': spi-sprd-adi.c:(.text+0x13): undefined reference to `hwspin_lock_free' drivers/spi/spi-sprd-adi.o: In function `sprd_adi_probe': spi-sprd-adi.c:(.text+0xf5): undefined reference to `of_hwspin_lock_get_id' spi-sprd-adi.c:(.text+0x107): undefined reference to `hwspin_lock_request_specific' spi-sprd-adi.c:(.text+0x22e): undefined reference to `hwspin_lock_free' drivers/spi/spi-sprd-adi.o: In function `sprd_adi_transfer_one': spi-sprd-adi.c:(.text+0x2eb): undefined reference to `__hwspin_lock_timeout' spi-sprd-adi.c:(.text+0x349): undefined reference to `__hwspin_unlock' spi-sprd-adi.c:(.text+0x389): undefined reference to `__hwspin_lock_timeout' spi-sprd-adi.c:(.text+0x3ee): undefined reference to `__hwspin_unlock' Signed-off-by: Randy Dunlap Cc: Baolin Wang Cc: Mark Brown Cc: linux-spi@vger.kernel.org --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) v2: allow build with or without HWSPINLOCK, but restrict SPI_SPRD_ADI to =m if HWSPINLOCK=m. -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-next-20170921.orig/drivers/spi/Kconfig +++ linux-next-20170921/drivers/spi/Kconfig @@ -625,6 +625,7 @@ config SPI_SIRF config SPI_SPRD_ADI tristate "Spreadtrum ADI controller" depends on ARCH_SPRD || COMPILE_TEST + depends on HWSPINLOCK || HWSPINLOCK=n help ADI driver based on SPI for Spreadtrum SoCs.