Skip to contentSkip to conversation

ASoC: Remove conditional I2C usage from tlv320aic3x driver

PATCH In review Mark Brown 2 participants 2 messages Nov 21, 2011 – Nov 22, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Remove conditional I2C usage from tlv320aic3x driver

The driver only supports I2C so doesn't need to do things conditionally.

---
 sound/soc/codecs/tlv320aic3x.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
sound/soc/codecs/tlv320aic3x.c +0 -6
index 14cb553..2e2bf18 100644
@@ -1481,7 +1481,6 @@ static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
 	.resume = aic3x_resume,
 };
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 /*
  * AIC3X 2 wire address can be up to 4 devices with device addresses
  * 0x18, 0x19, 0x1A, 0x1B
@@ -1548,27 +1547,22 @@ static struct i2c_driver aic3x_i2c_driver = {
 	.remove = aic3x_i2c_remove,
 	.id_table = aic3x_i2c_id,
 };
-#endif
 
 static int __init aic3x_modinit(void)
 {
 	int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 	ret = i2c_add_driver(&aic3x_i2c_driver);
 	if (ret != 0) {
 		printk(KERN_ERR "Failed to register TLV320AIC3x I2C driver: %d\n",
 		       ret);
 	}
-#endif
 	return ret;
 }
 module_init(aic3x_modinit);
 
 static void __exit aic3x_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 	i2c_del_driver(&aic3x_i2c_driver);
-#endif
 }
 module_exit(aic3x_exit);
 
Signature · 1 line
1.7.7.3
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Mark Brown

The driver only supports I2C so doesn't need to do things conditionally.

---
 sound/soc/codecs/tlv320aic3x.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
sound/soc/codecs/tlv320aic3x.c +0 -0
index 14cb553..2e2bf18 100644

sound/soc/codecs/tlv320aic3x.c static struct snd_soc_codec_driver soc_codec_dev_aic3x = { · line 1484

Quoted 4 lines
sound/soc/codecs/tlv320aic3x.c +0 -1
@@ -1481,7 +1481,6 @@ static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
 	.resume = aic3x_resume,
 };
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)

Yeah, these have been here just from the beginning and nobody haven't added SPI support so worth to remove.