aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorStefan Lengfeld <slengfeld@inovex.de>2017-11-01 21:06:41 +0100
committerWolfram Sang <wsa@the-dreams.de>2017-11-27 18:31:57 +0100
commit901a891fa6235b68d4c007800ea91c1a091f6f99 (patch)
treef45731c11261cd323fc0d33d4914571f1ff2bc00 /include/linux/i2c.h
parenti2c: designware: Don't set SCL timings and speed mode when in slave mode (diff)
downloadlinux-dev-901a891fa6235b68d4c007800ea91c1a091f6f99.tar.xz
linux-dev-901a891fa6235b68d4c007800ea91c1a091f6f99.zip
i2c: use macro IS_ENABLED in header i2c.h
Using the macro IS_ENABLED to check the option CONFIG_I2C=(y|m) makes the code nicer. No functional change. Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 0f774406fad0..5857236919cf 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -55,7 +55,7 @@ typedef int (*i2c_slave_cb_t)(struct i2c_client *, enum i2c_slave_event, u8 *);
struct module;
struct property_entry;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
/*
* The master routines are the ones normally used to transmit data to devices
* on a bus (or read from them). Apart from two basic transfer functions to
@@ -354,7 +354,7 @@ struct i2c_board_info {
.type = dev_type, .addr = (dev_addr)
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
/* Add-on boards should register/unregister their devices; e.g. a board
* with integrated I2C, a config eeprom, sensors, and a codec that's
* used in conjunction with the primary hardware.
@@ -706,7 +706,7 @@ i2c_unlock_adapter(struct i2c_adapter *adapter)
/* administration...
*/
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
extern int i2c_add_adapter(struct i2c_adapter *);
extern void i2c_del_adapter(struct i2c_adapter *);
extern int i2c_add_numbered_adapter(struct i2c_adapter *);