diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-01-26 20:59:31 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-01-26 22:05:20 +0100 |
commit | d5fd120e7860c2b3d4c936a2ebadb6b244bec4c8 (patch) | |
tree | accfd5191f854f2bef8b6405ffb3cb07d4e801f0 /drivers/i2c/i2c-core.c | |
parent | i2c: s3c2410: fix ABBA deadlock by keeping clock prepared (diff) | |
download | linux-d5fd120e7860c2b3d4c936a2ebadb6b244bec4c8.tar.xz linux-d5fd120e7860c2b3d4c936a2ebadb6b244bec4c8.zip |
i2c: Only include slave support if selected
Make the slave support depend on CONFIG_I2C_SLAVE. Otherwise it gets
included unconditionally, even when it is not needed.
I2C bus drivers which implement slave support must select
I2C_SLAVE.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 39d25a8cb1ad..e9eae57a2b50 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -2972,6 +2972,7 @@ trace: } EXPORT_SYMBOL(i2c_smbus_xfer); +#if IS_ENABLED(CONFIG_I2C_SLAVE) int i2c_slave_register(struct i2c_client *client, i2c_slave_cb_t slave_cb) { int ret; @@ -3019,6 +3020,7 @@ int i2c_slave_unregister(struct i2c_client *client) return ret; } EXPORT_SYMBOL_GPL(i2c_slave_unregister); +#endif MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); MODULE_DESCRIPTION("I2C-Bus main module"); |