Browse Source

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>
Fabio Estevam 12 years ago
parent
commit
516ea4b584
1 changed files with 4 additions and 4 deletions
  1. 4 4
      sound/soc/codecs/cs4271.c

+ 4 - 4
sound/soc/codecs/cs4271.c

@@ -675,7 +675,7 @@ static struct spi_driver cs4271_spi_driver = {
 };
 };
 #endif /* defined(CONFIG_SPI_MASTER) */
 #endif /* defined(CONFIG_SPI_MASTER) */
 
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static const struct i2c_device_id cs4271_i2c_id[] = {
 static const struct i2c_device_id cs4271_i2c_id[] = {
 	{"cs4271", 0},
 	{"cs4271", 0},
 	{}
 	{}
@@ -728,7 +728,7 @@ static struct i2c_driver cs4271_i2c_driver = {
 	.probe		= cs4271_i2c_probe,
 	.probe		= cs4271_i2c_probe,
 	.remove		= cs4271_i2c_remove,
 	.remove		= cs4271_i2c_remove,
 };
 };
-#endif /* defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) */
+#endif /* IS_ENABLED(CONFIG_I2C) */
 
 
 /*
 /*
  * We only register our serial bus driver here without
  * We only register our serial bus driver here without
@@ -741,7 +741,7 @@ static int __init cs4271_modinit(void)
 {
 {
 	int ret;
 	int ret;
 
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&cs4271_i2c_driver);
 	ret = i2c_add_driver(&cs4271_i2c_driver);
 	if (ret) {
 	if (ret) {
 		pr_err("Failed to register CS4271 I2C driver: %d\n", ret);
 		pr_err("Failed to register CS4271 I2C driver: %d\n", ret);
@@ -767,7 +767,7 @@ static void __exit cs4271_modexit(void)
 	spi_unregister_driver(&cs4271_spi_driver);
 	spi_unregister_driver(&cs4271_spi_driver);
 #endif
 #endif
 
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&cs4271_i2c_driver);
 	i2c_del_driver(&cs4271_i2c_driver);
 #endif
 #endif
 }
 }