Commit 12a7a709 authored by Mark Brown's avatar Mark Brown

ASoC: Remove conditional I2C usage from tlv320aic3x driver

The driver only supports I2C so doesn't need to do things conditionally.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarJarkko Nikula <jhnikula@gmail.com>
parent f733547a
...@@ -1481,7 +1481,6 @@ static struct snd_soc_codec_driver soc_codec_dev_aic3x = { ...@@ -1481,7 +1481,6 @@ static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
.resume = aic3x_resume, .resume = aic3x_resume,
}; };
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
/* /*
* AIC3X 2 wire address can be up to 4 devices with device addresses * AIC3X 2 wire address can be up to 4 devices with device addresses
* 0x18, 0x19, 0x1A, 0x1B * 0x18, 0x19, 0x1A, 0x1B
...@@ -1548,27 +1547,22 @@ static struct i2c_driver aic3x_i2c_driver = { ...@@ -1548,27 +1547,22 @@ static struct i2c_driver aic3x_i2c_driver = {
.remove = aic3x_i2c_remove, .remove = aic3x_i2c_remove,
.id_table = aic3x_i2c_id, .id_table = aic3x_i2c_id,
}; };
#endif
static int __init aic3x_modinit(void) static int __init aic3x_modinit(void)
{ {
int ret = 0; int ret = 0;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
ret = i2c_add_driver(&aic3x_i2c_driver); ret = i2c_add_driver(&aic3x_i2c_driver);
if (ret != 0) { if (ret != 0) {
printk(KERN_ERR "Failed to register TLV320AIC3x I2C driver: %d\n", printk(KERN_ERR "Failed to register TLV320AIC3x I2C driver: %d\n",
ret); ret);
} }
#endif
return ret; return ret;
} }
module_init(aic3x_modinit); module_init(aic3x_modinit);
static void __exit aic3x_exit(void) static void __exit aic3x_exit(void)
{ {
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
i2c_del_driver(&aic3x_i2c_driver); i2c_del_driver(&aic3x_i2c_driver);
#endif
} }
module_exit(aic3x_exit); module_exit(aic3x_exit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment