Skip to content

Commit e42644c

Browse files
fabioestevambroonie
authored andcommitted
ASoC: ssm2602: 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 e42644c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/ssm2602.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ static struct spi_driver ssm2602_spi_driver = {
730730
};
731731
#endif
732732

733-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
733+
#if IS_ENABLED(CONFIG_I2C)
734734
/*
735735
* ssm2602 2 wire address is determined by GPIO5
736736
* state during powerup.
@@ -797,7 +797,7 @@ static int __init ssm2602_modinit(void)
797797
return ret;
798798
#endif
799799

800-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
800+
#if IS_ENABLED(CONFIG_I2C)
801801
ret = i2c_add_driver(&ssm2602_i2c_driver);
802802
if (ret)
803803
return ret;
@@ -813,7 +813,7 @@ static void __exit ssm2602_exit(void)
813813
spi_unregister_driver(&ssm2602_spi_driver);
814814
#endif
815815

816-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
816+
#if IS_ENABLED(CONFIG_I2C)
817817
i2c_del_driver(&ssm2602_i2c_driver);
818818
#endif
819819
}

0 commit comments

Comments
 (0)