Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762287Ab2KBAJS (ORCPT ); Thu, 1 Nov 2012 20:09:18 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:17904 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752593Ab2KBAJR (ORCPT ); Thu, 1 Nov 2012 20:09:17 -0400 X-Authority-Analysis: v=2.0 cv=Q6tQEvKa c=1 sm=0 a=5n8MYtQuEtJVLSjGe4Mkvw==:17 a=XAgHJMm7m9YA:10 a=wom5GMh1gUkA:10 a=8oWMSCevoaIA:10 a=zz6odIEfzeQA:10 a=kj9zAlcOel0A:10 a=7kYe3NcsAAAA:8 a=JI4LjjGMiQEA:10 a=aLX-4j0Fmed6UHGNywYA:9 a=CjuIK1q_8ugA:10 a=-XA83Ip703gA:10 a=5n8MYtQuEtJVLSjGe4Mkvw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 108.176.196.169 Date: Thu, 1 Nov 2012 20:09:09 -0400 From: "Daniel M. Weeks" To: Grant Likely , Linus Walleij Cc: linux-kernel@vger.kernel.org Subject: [PATCH] gpio-mcp23s08: Build I2C support even when CONFIG_I2C=m Message-ID: <20121102000902.GA21574@dev.danweeks.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1730 Lines: 49 The driver has both SPI and I2C pieces. The appropriate pieces are built based on whether SPI and/or I2C is/are enabled. However, it was only checking if I2C was built-in, never if it was built as a module. This patch checks for either since building both this driver and I2C as modules is possible. Signed-off-by: Daniel M. Weeks --- drivers/gpio/gpio-mcp23s08.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index 0f42518..0f58d0f 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -77,7 +77,7 @@ struct mcp23s08_driver_data { /*----------------------------------------------------------------------*/ -#ifdef CONFIG_I2C +#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) static int mcp23008_read(struct mcp23s08 *mcp, unsigned reg) { @@ -399,7 +399,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, break; #endif /* CONFIG_SPI_MASTER */ -#ifdef CONFIG_I2C +#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) case MCP_TYPE_008: mcp->ops = &mcp23008_ops; mcp->chip.ngpio = 8; @@ -473,7 +473,7 @@ fail: /*----------------------------------------------------------------------*/ -#ifdef CONFIG_I2C +#if defined(CONFIG_I2C) || defined (CONFIG_I2C_MODULE) static int __devinit mcp230xx_probe(struct i2c_client *client, const struct i2c_device_id *id) -- Daniel M. Weeks -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/