linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: nforce2: Use IS_ENABLED() instead of checking for built-in or module
@ 2016-04-26 17:22 Javier Martinez Canillas
  2016-04-26 21:38 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Javier Martinez Canillas @ 2016-04-26 17:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Jean Delvare, Wolfram Sang, linux-i2c

The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/i2c/busses/i2c-nforce2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 70b3c9158509..42fcc9458432 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -127,7 +127,7 @@ static struct pci_driver nforce2_driver;
 
 /* For multiplexing support, we need a global reference to the 1st
    SMBus channel */
-#if defined CONFIG_I2C_NFORCE2_S4985 || defined CONFIG_I2C_NFORCE2_S4985_MODULE
+#if IS_ENABLED(CONFIG_I2C_NFORCE2_S4985)
 struct i2c_adapter *nforce2_smbus;
 EXPORT_SYMBOL_GPL(nforce2_smbus);
 
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: nforce2: Use IS_ENABLED() instead of checking for built-in or module
  2016-04-26 17:22 [PATCH] i2c: nforce2: Use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas
@ 2016-04-26 21:38 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-04-26 21:38 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: linux-kernel, Jean Delvare, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

On Tue, Apr 26, 2016 at 01:22:33PM -0400, Javier Martinez Canillas wrote:
> The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
> built-in or as a module, use that macro instead of open coding the same.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-26 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 17:22 [PATCH] i2c: nforce2: Use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas
2016-04-26 21:38 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).