Skip to content

Commit 516ea4b

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: cs4271: 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 516ea4b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎sound/soc/codecs/cs4271.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static struct spi_driver cs4271_spi_driver = {
675675
};
676676
#endif /* defined(CONFIG_SPI_MASTER) */
677677

678-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
678+
#if IS_ENABLED(CONFIG_I2C)
679679
static const struct i2c_device_id cs4271_i2c_id[] = {
680680
{"cs4271", 0},
681681
{}
@@ -728,7 +728,7 @@ static struct i2c_driver cs4271_i2c_driver = {
728728
.probe = cs4271_i2c_probe,
729729
.remove = cs4271_i2c_remove,
730730
};
731-
#endif /* defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) */
731+
#endif /* IS_ENABLED(CONFIG_I2C) */
732732

733733
/*
734734
* We only register our serial bus driver here without
@@ -741,7 +741,7 @@ static int __init cs4271_modinit(void)
741741
{
742742
int ret;
743743

744-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
744+
#if IS_ENABLED(CONFIG_I2C)
745745
ret = i2c_add_driver(&cs4271_i2c_driver);
746746
if (ret) {
747747
pr_err("Failed to register CS4271 I2C driver: %d\n", ret);
@@ -767,7 +767,7 @@ static void __exit cs4271_modexit(void)
767767
spi_unregister_driver(&cs4271_spi_driver);
768768
#endif
769769

770-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
770+
#if IS_ENABLED(CONFIG_I2C)
771771
i2c_del_driver(&cs4271_i2c_driver);
772772
#endif
773773
}

0 commit comments

Comments
 (0)