From patchwork Thu Oct 5 20:39:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9987935 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 E91236029B for ; Thu, 5 Oct 2017 20:39:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D93F828D36 for ; Thu, 5 Oct 2017 20:39:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C565128D4E; Thu, 5 Oct 2017 20:39:56 +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.9 required=2.0 tests=BAYES_00,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 4005728D33 for ; Thu, 5 Oct 2017 20:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbdJEUjz (ORCPT ); Thu, 5 Oct 2017 16:39:55 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:60348 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbdJEUjz (ORCPT ); Thu, 5 Oct 2017 16:39:55 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MBCTt-1e8Dp53NzR-00ACQx; Thu, 05 Oct 2017 22:39:50 +0200 From: Arnd Bergmann To: Mark Brown Cc: Arnd Bergmann , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [SUBMITTED 20171005] spi: spreadtrum adi: add hwspinlock dependency Date: Thu, 5 Oct 2017 22:39:37 +0200 Message-Id: <20171005203949.3227075-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:76hSuk/kFwEkRaTMiS3i6BjkLyyeI2qwPsaRP89+l5r74tXqrbL COaip4oVK2oYObyMo5Q8seI29p3L1OlpoKvz9iHXukAp7z2LBc3c91g7f/b06ZLakN4OjGa wcGKAqkOhV9RBo28UC3EAdTorl2YiYvhR7mfkmejMNAAwiMmsUqk4a3GYJszb8pLJ2111Lm OEf00Wv9E2715GHEb1beQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:bkN5Zro/YrA=:mgKQfbC9H/qG3HWV5ZaJdX jWTxwsIZsBDLgAUm/URSa48gvtoOGNIdBjP1cOJnPnzisaxd8X+naJ3top5rqbgeotMHVysz4 ww7uawDieuczvxZ1K/Dzq7KaaciI2+QBjuurZ73k50OOsti8oPQojMr+CXSTkiNnJpEiXl0d9 XJtuErCq0S+0wOLU1+YSRD6+4hU6fwTJhN64tCCtwxe3jMBiwEDH53DN41BrvoqxkT0lKeD6c 3LzqFWtG6JH46rjDZFLH7z2se78dg1rZrxExmIGmxOqHv6tIR+MPgFCS5BAIp1ogUW3z0g/FZ 4DrMTKfnMQTxU44XyI7CrA86pdi59Bnzo+z2G+m7aYgKhNTbDb539Rn/b8GFUHxCBJ3JD+h9P /7B5pmT3q0/Yymi/WP7OJo1WYf5z0AfjoMLW0Yu/zgi5DtY6/z4LPbHgV1do4qGaP9Qh/aI6p TpZIYrTh/7mq4wrj3ic6/e6XSK+WAsbf9mPtvwIEBOGzkCanCaqVzwVnp6amtXhGNVDLoiONQ 6M4aPyvJNYTYvSnqQ/l13r+BYun8buSerzrZbkf+bgsY1CCcdSoNGzy6vidaF2aYk+tKy+B2c LlQg/FabptQW9yEaJ81oMA2tWEATya44SNJ8UiwYYKYQpmXe7YTdpR9K8mjdnptxRFWlc8VQV rynzJwacMLWCjNSvJBNNye8cRgV1Xnq2R1BfFt8Y47nBWVhlYR2PSM0pn1pNGRF/cVidOIk4a 0Y1LJFObu6OOutQ8HLmfJSBckWS8K9TE3HTe2A== 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 With CONFIG_HWSPINLOCK=m, the new driver fails to link as a built-in driver: drivers/spi/spi-sprd-adi.o: In function `sprd_adi_remove': spi-sprd-adi.c:(.text+0x18): undefined reference to `hwspin_lock_free' drivers/spi/spi-sprd-adi.o: In function `sprd_adi_probe': spi-sprd-adi.c:(.text+0xfc): undefined reference to `of_hwspin_lock_get_id' spi-sprd-adi.c:(.text+0x108): undefined reference to `hwspin_lock_request_specific' spi-sprd-adi.c:(.text+0x268): undefined reference to `hwspin_lock_free' This adds a hard Kconfig dependency on HWSPINLOCK for the !COMPILE_TEST case, and allows compile-testing with HWSPINLOCK completely disabled, which will then rely on the existing stub API. Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Signed-off-by: Arnd Bergmann --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 2d9601e3a6ae..ed532ac2eebe 100644 --- a/drivers/spi/Kconfig +++ b/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 || (COMPILE_TEST && !HWSPINLOCK) help ADI driver based on SPI for Spreadtrum SoCs.