From patchwork Mon Jan 14 09:55:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 155415 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3467187jaa; Mon, 14 Jan 2019 01:55:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN4mYFidFMzOeFKTurouo8/GJGRDM8yh9VjsTCltxrorKmZ0O0NIgWcy8iGk28gSQv9SWqNn X-Received: by 2002:a63:f844:: with SMTP id v4mr21951096pgj.82.1547459750940; Mon, 14 Jan 2019 01:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547459750; cv=none; d=google.com; s=arc-20160816; b=DU1ki0ahddgnf7EWfHQH7CYS3T9x/z3fjm1Y0MPL7iCdXhmKcNnc4ZWEiS51wIcqfC fq0UqVAKIqM6lj3IXAebENDyakAb8l8Z//8p6K6eJkmcUBog7yKB8MKnGlTj0PX4xR87 VhJz9VhTrrp87dt/RATFsFMk9+B1RzmOi2g1/DNwEe6e/Pzjd7tZy97BhU9zGOE94NkW g/r8sJVn1lHAF6rL3rilML6Fd9KpHOZOViRkOH297jhyhc436H6wgi5ZnVyEkEwzBTS+ jzMZcvgqz06AYo2GVhgljqNZXeyfRERx6wJUjP2K0uR0cf51XhfAswuM3y+1TIvk8QBX XIjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kiHdA9QkJRvfjwHTIrMx6nrkjWZbNgwvVi/jDVnFEGU=; b=neePSVHRaCgxEqX1zvCxgInbJ2Ht5vWbURliWyjlKxvSzwhTEGXFf2SRXV1MZ+X+Bm Rz1jbkokODpKVDyK9ohdMJdJz7+lH1e6Q8J5egyJ7GhvMlbVdFyM6hB242/ejti8X9Pe QiyWKTBdloEAqWzW5Rvor8uPth+CtIPBf8NhX+5EbBIqQSA3pBH2IDw+sx7B3pMKq7KJ qx37Z2UuU8c0ThyFyNcwQKFgmnz8daXlOiAFHZAqIO0ejEo1kW4KyZLCr/ooGKVHAHCj 1m1WmOy6Awpl4VTVdpilmcBdV2A4o+j6hKAUOjrLefzRrL2w1XjFdMlhFqWdujgbVSNj slHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aQYq2n9C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x61si7935964plb.303.2019.01.14.01.55.50; Mon, 14 Jan 2019 01:55:50 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=aQYq2n9C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726792AbfANJzt (ORCPT + 31 others); Mon, 14 Jan 2019 04:55:49 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44980 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfANJzt (ORCPT ); Mon, 14 Jan 2019 04:55:49 -0500 Received: by mail-lf1-f65.google.com with SMTP id z13so15085687lfe.11 for ; Mon, 14 Jan 2019 01:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kiHdA9QkJRvfjwHTIrMx6nrkjWZbNgwvVi/jDVnFEGU=; b=aQYq2n9CIgX+UUZJoi1/zKIjsIVGr6rKv7tinq2DX+ymRYSvAvjKbbFn3h+NBG/ZRh ZO5NPMlvMJJSQ4IJRrc9DQmOXha7I6lw7tns78lpbnD02CEAnl5dQSx7gUTkckTuw8Q5 yBvUGeV5cYdFSUQxesN0EaQAaUE4Hd/WrRdGo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kiHdA9QkJRvfjwHTIrMx6nrkjWZbNgwvVi/jDVnFEGU=; b=joMVUchO76Gp7kcL1qTkwvKdczs19ZGnICuNFojwhBuIrEjoAcFwmFga+NLHSRgUv1 5b5aZ4eGvpEfndNHGpieYrnws75UW9Gr2BLPCtBoFH87F9oRPn+6ifVnsptYgWzxQVzC xKsLj+2Apv8ykAsltRg7fBVc3ResRrOnla48d6NGjajm3H4lO8nsQgf8GTZ/Ji1g6vB3 3e9EjD2TJwRmtzZLQ7LDg1bsV4zyY6jUwAmLMNFZ9cihXr9+c7VV6v5BOkYvVsY2vzWQ W6AUaBXvfDQ/e6muDuOFg4dy27LmUmoM85hyd5a0uyfZEV8vzSO+vow1wUWHdoWCdq0J u3rQ== X-Gm-Message-State: AJcUukejyMjPJ0pUJjDplL5f6VrUSCSkJyuJ9FqLJs3B+eQ/xCzliHoK eKcJAs/vyjLt7k5M5uBD5h6uZw== X-Received: by 2002:a19:7006:: with SMTP id h6mr13504722lfc.147.1547459746705; Mon, 14 Jan 2019 01:55:46 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id f16-v6sm17516494lji.88.2019.01.14.01.55.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 01:55:46 -0800 (PST) From: Anders Roxell To: perex@perex.cz, tiwai@suse.com, brian.austin@cirrus.com, Paul.Handrigan@cirrus.com, lgirdwood@gmail.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH 1/3] ASoC: cs4341: fix waring unused-function Date: Mon, 14 Jan 2019 10:55:40 +0100 Message-Id: <20190114095540.22956-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver cs4341 can be built with SPI and/or I2C, but it has to be one of them at least. When I2C is set as a module we see the warning below: sound/soc/codecs/cs4341.c:213:12: warning: ‘cs4341_probe’ defined but not used [-Wunused-function] static int cs4341_probe(struct device *dev) ^~~~~~~~~~~~ Rework so that we use IS_ENABLED instead of defined. Also change so SND_SOC_CS4341 depends on SND_SOC_I2C_AND_SPI to we dont' get a link error when SND_SOC_CS4341=y, I2C=m and REGMAP_I2C=m is set. Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell --- sound/soc/codecs/Kconfig | 2 +- sound/soc/codecs/cs4341.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.19.2 diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 87cb9c51e6f5..87ecb38e57f4 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -546,7 +546,7 @@ config SND_SOC_CS43130 config SND_SOC_CS4341 tristate "Cirrus Logic CS4341 CODEC" - depends on I2C || SPI_MASTER + depends on SND_SOC_I2C_AND_SPI select REGMAP_I2C if I2C select REGMAP_SPI if SPI_MASTER diff --git a/sound/soc/codecs/cs4341.c b/sound/soc/codecs/cs4341.c index d2e616a89fd4..ade7477d04f1 100644 --- a/sound/soc/codecs/cs4341.c +++ b/sound/soc/codecs/cs4341.c @@ -223,7 +223,7 @@ static int cs4341_probe(struct device *dev) &cs4341_dai, 1); } -#if defined(CONFIG_I2C) +#if IS_ENABLED(CONFIG_I2C) static int cs4341_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -317,7 +317,7 @@ static int __init cs4341_init(void) { int ret = 0; -#if defined(CONFIG_I2C) +#if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&cs4341_i2c_driver); if (ret) return ret; @@ -332,7 +332,7 @@ module_init(cs4341_init); static void __exit cs4341_exit(void) { -#if defined(CONFIG_I2C) +#if IS_ENABLED(CONFIG_I2C) i2c_del_driver(&cs4341_i2c_driver); #endif #if defined(CONFIG_SPI_MASTER) From patchwork Mon Jan 14 09:57:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 155417 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3468635jaa; Mon, 14 Jan 2019 01:58:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN6tG9DcfHQhq5bUC6m+SwME9rP1tohxot4Kp6gid2137knn/zstygiVf/EgsgsF7RoHiQxd X-Received: by 2002:a63:6d48:: with SMTP id i69mr21248044pgc.215.1547459881255; Mon, 14 Jan 2019 01:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547459881; cv=none; d=google.com; s=arc-20160816; b=Wbs462WHjsUSnsYpUJc78WsK2JqDXPKz5VxnBZE0Zsh4H7Qn936q2DLvHUme+Av3sm UbLvQXhChn0q+8xbvl69YsnixlUFm0szHK3Tf6OmWF7K0znkCMt5W8VyatZmehTPYN8l AHYpMnS/j/giQ5cDJT7Vd8QHp7NQ0/zyNo0wpFMJpibwS2p7uIK7uN/mOmp0h9Dn/IF/ 6gu5aMHKC7VirlSb8ENhoGICegOd7EpAR84EC/G+MGmG8D3cbM0RHsaG/SEuww8KIcuS sUG1ySqarIv81hNpwH1cDNZeSSeyyxI7Ni/e3CoyAhUSRDv2HNaZaDSOafH1SsCwXTng whAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=TZeGN3rlRP+BY2QvEk3qQEzkoTkwqoKfmJP5E6E9R+U=; b=h1PkfjTSIHUVmbUIf6gdSW8AjWY+GUNIpUbbrVMmOkKbp4laGohfidZcfxRRaq+dkL gBpjYVvaEBXBw1y/WpS/yFb3FptM5txy6Ygkgdi+7oflOC9Y/LmF31+EGjCFVrwa/m/X 0aAnCNgEI0GifoMVJJsluVgrX17fNLBJBCPvvsTCvzkhczopdsT5gE19SBsKYviBhZcR 43skyMwU+B16rKEPshE8PmwylcEsM+autEJuGy3QTVMRr5W/VL3LP6dkhto+S5qXnuqP LpJNLHyRk87aUnPci1fCi2liF+KN0teL7ZyA23wxyEsTN+3YnilciDNz3uhUC5/ck43p xqIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BAHt31rl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si24501985pgh.469.2019.01.14.01.58.00; Mon, 14 Jan 2019 01:58:01 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=BAHt31rl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbfANJ6A (ORCPT + 31 others); Mon, 14 Jan 2019 04:58:00 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:41793 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbfANJ57 (ORCPT ); Mon, 14 Jan 2019 04:57:59 -0500 Received: by mail-lf1-f67.google.com with SMTP id c16so15101609lfj.8 for ; Mon, 14 Jan 2019 01:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=TZeGN3rlRP+BY2QvEk3qQEzkoTkwqoKfmJP5E6E9R+U=; b=BAHt31rlG9ugX7GNkSQ9IQMxQXOCNsAl+g2MFZgDG1d35EKxagIDsIaPKF3jB2BQ9F BQIh1bzTmWWLRSQZXu7H6fBgtTuNOERB7JS2MqG5JxBUAl+ga/gL72fwDFy7/lm+Trk0 RtMlLl/ZdNGx7FtNfiKbRQRaT4LQrOh4QRIqQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TZeGN3rlRP+BY2QvEk3qQEzkoTkwqoKfmJP5E6E9R+U=; b=G7pOv+ccTuQ9o0hvMJQ27UZvnCYgRpmMsn+ToDH3DoW7bWfL4YSrzyJ2nvtsX74gDf pKAE9ROixxbZcZuJ8UXVfmntzn6VybeKn3ESDnowmnKV7Jy1TXTSTNEjjAHoCaC4el4b MHYfn43Tiw9xtQwE4L8KwAL18ctcDBtW/vxRbIxSpyc1Hkuf9U0HDW0/LjlV+T8ksfsX ieC2YzDsVQqTXNZl1mcfTVSlbn+ZMZ07GxyWusUrbrr4iZ0Mko4DLFGIUijeTQ/IqF5u GBrWcKgSWgHtDNa4m2XsSxE2U/0gHgVYCsf5xPviggmCrXxpKxrvh8ILF4KRl76vs7tG JYOw== X-Gm-Message-State: AJcUukfR6Vo4xbFBo0psnEmi/hL41SqRj/lgF8ssfqhRfmCIsIv6+jsN nfXUIyX5ZzpyDQyiK9ZsGXpsWg== X-Received: by 2002:a19:ee08:: with SMTP id g8mr13283753lfb.72.1547459877456; Mon, 14 Jan 2019 01:57:57 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id u12-v6sm17389497ljk.79.2019.01.14.01.57.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 01:57:56 -0800 (PST) From: Anders Roxell To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH 3/3] input: touchscreen: fix link error Date: Mon, 14 Jan 2019 10:57:54 +0100 Message-Id: <20190114095754.23175-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix link error when TOUCHSCREEN_RASPBERRYPI_FW is enabled as a module and the dependent module is built-in. The 'depends on RASPBERRYPI_FIRMWARE' by itself prevents the touchscreen driver from being built-in when the firmware is configured as a module. However, the '|| COMPILE_TEST' still allows it unless we explicitly prevent that configuration with '|| (RASPBERRYPI_FIRMWARE=n && COMPILE_TEST)' ld: drivers/input/touchscreen/raspberrypi-ts.o: in function `rpi_ts_probe': raspberrypi-ts.c:(.text+0x3a8): undefined reference to `rpi_firmware_get' ld: raspberrypi-ts.c:(.text+0x3a8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_get' ld: raspberrypi-ts.c:(.text+0x4c8): undefined reference to `rpi_firmware_property' ld: raspberrypi-ts.c:(.text+0x4c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_property' Rework so that TOUCHSCREEN_RASPBERRYPI_FW depends on RASPBERRYPI_FIRMWARE=n if COMPILE_TEST is enabled. Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell --- drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.2 diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index af6027cc7bbf..068dbbc610fc 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -698,7 +698,7 @@ config TOUCHSCREEN_EDT_FT5X06 config TOUCHSCREEN_RASPBERRYPI_FW tristate "Raspberry Pi's firmware base touch screen support" - depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST + depends on RASPBERRYPI_FIRMWARE || (RASPBERRYPI_FIRMWARE=n && COMPILE_TEST) help Say Y here if you have the official Raspberry Pi 7 inch screen on your system.