Skip to content

Commit 8e6ad35

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: wm8510: 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 8e6ad35

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8510.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ static struct spi_driver wm8510_spi_driver = {
684684
};
685685
#endif /* CONFIG_SPI_MASTER */
686686

687-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
687+
#if IS_ENABLED(CONFIG_I2C)
688688
static int wm8510_i2c_probe(struct i2c_client *i2c,
689689
const struct i2c_device_id *id)
690690
{
@@ -735,7 +735,7 @@ static struct i2c_driver wm8510_i2c_driver = {
735735
static int __init wm8510_modinit(void)
736736
{
737737
int ret = 0;
738-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
738+
#if IS_ENABLED(CONFIG_I2C)
739739
ret = i2c_add_driver(&wm8510_i2c_driver);
740740
if (ret != 0) {
741741
printk(KERN_ERR "Failed to register WM8510 I2C driver: %d\n",
@@ -755,7 +755,7 @@ module_init(wm8510_modinit);
755755

756756
static void __exit wm8510_exit(void)
757757
{
758-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
758+
#if IS_ENABLED(CONFIG_I2C)
759759
i2c_del_driver(&wm8510_i2c_driver);
760760
#endif
761761
#if defined(CONFIG_SPI_MASTER)

0 commit comments

Comments
 (0)