Skip to content

Commit b65ab73

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: wm8731: 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 b65ab73

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8731.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static struct spi_driver wm8731_spi_driver = {
732732
};
733733
#endif /* CONFIG_SPI_MASTER */
734734

735-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
735+
#if IS_ENABLED(CONFIG_I2C)
736736
static int wm8731_i2c_probe(struct i2c_client *i2c,
737737
const struct i2c_device_id *id)
738738
{
@@ -791,7 +791,7 @@ static struct i2c_driver wm8731_i2c_driver = {
791791
static int __init wm8731_modinit(void)
792792
{
793793
int ret = 0;
794-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
794+
#if IS_ENABLED(CONFIG_I2C)
795795
ret = i2c_add_driver(&wm8731_i2c_driver);
796796
if (ret != 0) {
797797
printk(KERN_ERR "Failed to register WM8731 I2C driver: %d\n",
@@ -811,7 +811,7 @@ module_init(wm8731_modinit);
811811

812812
static void __exit wm8731_exit(void)
813813
{
814-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
814+
#if IS_ENABLED(CONFIG_I2C)
815815
i2c_del_driver(&wm8731_i2c_driver);
816816
#endif
817817
#if defined(CONFIG_SPI_MASTER)

0 commit comments

Comments
 (0)