From patchwork Wed Sep 7 21:17:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 75692 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp520269qgf; Wed, 7 Sep 2016 14:17:17 -0700 (PDT) X-Received: by 10.98.59.145 with SMTP id w17mr35385503pfj.93.1473283037782; Wed, 07 Sep 2016 14:17:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vv2si22830798pab.2.2016.09.07.14.17.17; Wed, 07 Sep 2016 14:17:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750878AbcIGVRR (ORCPT + 4 others); Wed, 7 Sep 2016 17:17:17 -0400 Received: from mail-lf0-f47.google.com ([209.85.215.47]:35258 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbcIGVRQ (ORCPT ); Wed, 7 Sep 2016 17:17:16 -0400 Received: by mail-lf0-f47.google.com with SMTP id l131so7552656lfl.2 for ; Wed, 07 Sep 2016 14:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pMrU19adytZSbHsVE077TjT+/OMzZfXsE6pgZ5ff4oM=; b=PY2dqwEb6S7b/iHgg5s7/YZMORbTl1cFlwe0Uo/od5cVmbFY0AQNnQrP2BVslkkMoB 1ShKMUdyZe4WPRV0rvOFDcWcc4t1huDvREUEJvL3oJ9+7jjsNjinILVZgM7otNPjZwFB UukaKi65tV95IgYgIT4NvhIo88dcgc2HWEeHg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pMrU19adytZSbHsVE077TjT+/OMzZfXsE6pgZ5ff4oM=; b=el/3NCfF86WZSkymXMNMZez0oxT/Nyz4O8czV5vJfa6EYol7YPakmW4NonRY04y5VS ImhS53dGckWvfZsFNWqORWOGNxzE6mDcgn6yRNyKsEr9Ya05h1NMh7QgAyriBU6EsW6W iTFVPWfkYct0cFdIM8vRdjhfXq+Dfhs+VaVabBc8AsnnWyNJJHYkGOitFECcmvv8KQIZ dN9JAkaNMrNfdowe1jpJ0ZDMo0y8pCli6ZLYP7PoypHmWDxOfL2TSHd85Qa3ModV5RtU xT78mCUawlbhrDQVFWs1T8tp4FSyVRjb3UGvlFgQ/Jtp8MpVq0qAHMu16YiBpY9Cpgbr cDug== X-Gm-Message-State: AE9vXwM+w5bmMPRl+yKqvuWsB0cu9g2k1i3wwwoT4tmOFWsHUrv2DovXvfWQCd/a+pQKxwYC X-Received: by 10.25.32.136 with SMTP id g130mr474897lfg.184.1473283034628; Wed, 07 Sep 2016 14:17:14 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id r190sm314215lfg.49.2016.09.07.14.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 14:17:13 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij , Alexander Stein , Phil Reid Subject: [PATCH] gpio: mcp23s08: make driver depend on OF_GPIO Date: Wed, 7 Sep 2016 23:17:10 +0200 Message-Id: <1473283030-22371-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The MCP23S08 driver certainly accesses fields inside the struct gpio_chip that are only available under CONFIG_OF_GPIO not just CONFIG_OF, so update the Kconfig and driver to reflect this. Cc: Alexander Stein Cc: Phil Reid Reported-by: kbuild test robot Signed-off-by: Linus Walleij --- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-mcp23s08.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 66a94103798b..24caedb00a7a 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -1131,6 +1131,7 @@ menu "SPI or I2C GPIO expanders" config GPIO_MCP23S08 tristate "Microchip MCP23xxx I/O expander" + depends on OF_GPIO select GPIOLIB_IRQCHIP help SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017 diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index ac22efc1840e..99d37b56c258 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -564,7 +564,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, mcp->chip.direction_output = mcp23s08_direction_output; mcp->chip.set = mcp23s08_set; mcp->chip.dbg_show = mcp23s08_dbg_show; -#ifdef CONFIG_OF +#ifdef CONFIG_OF_GPIO mcp->chip.of_gpio_n_cells = 2; mcp->chip.of_node = dev->of_node; #endif