Skip to content

Commit 1769267

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

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8776.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ static struct spi_driver wm8776_spi_driver = {
532532
};
533533
#endif /* CONFIG_SPI_MASTER */
534534

535-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
535+
#if IS_ENABLED(CONFIG_I2C)
536536
static int wm8776_i2c_probe(struct i2c_client *i2c,
537537
const struct i2c_device_id *id)
538538
{
@@ -584,7 +584,7 @@ static struct i2c_driver wm8776_i2c_driver = {
584584
static int __init wm8776_modinit(void)
585585
{
586586
int ret = 0;
587-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
587+
#if IS_ENABLED(CONFIG_I2C)
588588
ret = i2c_add_driver(&wm8776_i2c_driver);
589589
if (ret != 0) {
590590
printk(KERN_ERR "Failed to register wm8776 I2C driver: %d\n",
@@ -604,7 +604,7 @@ module_init(wm8776_modinit);
604604

605605
static void __exit wm8776_exit(void)
606606
{
607-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
607+
#if IS_ENABLED(CONFIG_I2C)
608608
i2c_del_driver(&wm8776_i2c_driver);
609609
#endif
610610
#if defined(CONFIG_SPI_MASTER)

0 commit comments

Comments
 (0)