Skip to content

Commit d44008b

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: wm8995: Use IS_ENABLED() macro
Using the IS_ENABLED() macro can make the code shorter and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent 6ce4eac commit d44008b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8995.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ static struct spi_driver wm8995_spi_driver = {
22932293
};
22942294
#endif
22952295

2296-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
2296+
#if IS_ENABLED(CONFIG_I2C)
22972297
static int wm8995_i2c_probe(struct i2c_client *i2c,
22982298
const struct i2c_device_id *id)
22992299
{
@@ -2350,7 +2350,7 @@ static int __init wm8995_modinit(void)
23502350
{
23512351
int ret = 0;
23522352

2353-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
2353+
#if IS_ENABLED(CONFIG_I2C)
23542354
ret = i2c_add_driver(&wm8995_i2c_driver);
23552355
if (ret) {
23562356
printk(KERN_ERR "Failed to register wm8995 I2C driver: %d\n",
@@ -2371,7 +2371,7 @@ module_init(wm8995_modinit);
23712371

23722372
static void __exit wm8995_exit(void)
23732373
{
2374-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
2374+
#if IS_ENABLED(CONFIG_I2C)
23752375
i2c_del_driver(&wm8995_i2c_driver);
23762376
#endif
23772377
#if defined(CONFIG_SPI_MASTER)

0 commit comments

Comments
 (0)