Arnd Bergmann 5d388143fa i2c: gxp: fix build failure without CONFIG_I2C_SLAVE
The gxp_i2c_slave_irq_handler() is hidden in an #ifdef, but the
caller uses an IS_ENABLED() check:

drivers/i2c/busses/i2c-gxp.c: In function 'gxp_i2c_irq_handler':
drivers/i2c/busses/i2c-gxp.c:467:29: error: implicit declaration of function 'gxp_i2c_slave_irq_handler'; did you mean 'gxp_i2c_irq_handler'? [-Werror=implicit-function-declaration]

It has to consistently use one method or the other to avoid warnings,
so move to IS_ENABLED() here for readability and build coverage, and
move the #ifdef in linux/i2c.h to allow building it as dead code.

Fixes: 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nick Hawkins <nick.hawkins@hpe.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-05-03 17:27:29 +02:00
..
2020-09-27 15:14:16 +02:00
2023-02-24 17:12:23 -08:00
2021-08-19 19:18:17 +02:00
2023-04-05 19:41:10 +02:00
2023-02-24 17:12:23 -08:00
2022-07-22 18:46:41 +02:00
2021-04-17 22:00:58 +02:00
2022-01-14 18:50:52 -05:00
2021-11-23 10:00:12 +01:00
2023-02-17 23:18:20 +01:00