diff options
author | Wolfram Sang | 2022-02-10 22:33:41 +0100 |
---|---|---|
committer | Wolfram Sang | 2022-02-15 09:58:57 +0100 |
commit | 481153991c410e322383490527c20b0c41dbf652 (patch) | |
tree | 90d68250186dc6801d54d3e334823e93259c7744 /drivers/i2c/i2c-core.h | |
parent | f1bd6661946b20d1ea07de84a3c9a550e0367476 (diff) |
i2c: don't expose function which is only used internally
i2c_setup_smbus_alert() is only needed within the I2C core, so no need
to expose it to other modules.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-core.h')
-rw-r--r-- | drivers/i2c/i2c-core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h index 8ce261167a2d..87e2c914f1c5 100644 --- a/drivers/i2c/i2c-core.h +++ b/drivers/i2c/i2c-core.h @@ -86,3 +86,12 @@ void of_i2c_register_devices(struct i2c_adapter *adap); static inline void of_i2c_register_devices(struct i2c_adapter *adap) { } #endif extern struct notifier_block i2c_of_notifier; + +#if IS_ENABLED(CONFIG_I2C_SMBUS) +int i2c_setup_smbus_alert(struct i2c_adapter *adap); +#else +static inline int i2c_setup_smbus_alert(struct i2c_adapter *adap) +{ + return 0; +} +#endif |