* [PATCHv2] gpio-mcp23s08: Build I2C support even when CONFIG_I2C=m
@ 2012-11-07 4:51 Daniel M. Weeks
2012-11-08 21:15 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Daniel M. Weeks @ 2012-11-07 4:51 UTC (permalink / raw)
To: Grant Likely, Linus Walleij; +Cc: linux-kernel
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 <dan@danweeks.net>
---
v2: use IS_ENABLED macro
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..ce1c847 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 IS_ENABLED(CONFIG_I2C)
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 IS_ENABLED(CONFIG_I2C)
case MCP_TYPE_008:
mcp->ops = &mcp23008_ops;
mcp->chip.ngpio = 8;
@@ -473,7 +473,7 @@ fail:
/*----------------------------------------------------------------------*/
-#ifdef CONFIG_I2C
+#if IS_ENABLED(CONFIG_I2C)
static int __devinit mcp230xx_probe(struct i2c_client *client,
const struct i2c_device_id *id)
--
Daniel M. Weeks
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCHv2] gpio-mcp23s08: Build I2C support even when CONFIG_I2C=m
2012-11-07 4:51 [PATCHv2] gpio-mcp23s08: Build I2C support even when CONFIG_I2C=m Daniel M. Weeks
@ 2012-11-08 21:15 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2012-11-08 21:15 UTC (permalink / raw)
To: Daniel M. Weeks; +Cc: Grant Likely, linux-kernel
On Wed, Nov 7, 2012 at 5:51 AM, Daniel M. Weeks <dan@danweeks.net> wrote:
> 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 <dan@danweeks.net>
Thanks, patch merged to my fixes branch.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-08 21:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 4:51 [PATCHv2] gpio-mcp23s08: Build I2C support even when CONFIG_I2C=m Daniel M. Weeks
2012-11-08 21:15 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox