Title: [7473] trunk/sound/soc/codecs/adau1371.c: task[#5443] clean up code since there is only I2C configuring interface
- Revision
- 7473
- Author
- cliff
- Date
- 2009-09-27 04:29:08 -0400 (Sun, 27 Sep 2009)
Log Message
task[#5443] clean up code since there is only I2C configuring interface
Modified Paths
Diff
Modified: trunk/sound/soc/codecs/adau1371.c (7472 => 7473)
--- trunk/sound/soc/codecs/adau1371.c 2009-09-27 06:46:17 UTC (rev 7472)
+++ trunk/sound/soc/codecs/adau1371.c 2009-09-27 08:29:08 UTC (rev 7473)
@@ -1008,8 +1008,6 @@
static struct snd_soc_device *adau1371_socdev;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
-
static int adau1371_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -1043,7 +1041,7 @@
/* corgi i2c codec control layer */
static struct i2c_driver adau1371_i2c_driver = {
.driver = {
- .name = "adau1371 I2C Codec",
+ .name = "adau1371",
.owner = THIS_MODULE,
},
.probe = adau1371_i2c_probe,
@@ -1089,7 +1087,6 @@
i2c_del_driver(&adau1371_i2c_driver);
return -ENODEV;
}
-#endif
static int __devinit adau1371_probe(struct platform_device *pdev)
{
@@ -1117,14 +1114,10 @@
INIT_LIST_HEAD(&codec->dapm_paths);
adau1371_socdev = socdev;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
if (setup->i2c_address) {
codec->hw_write = (hw_write_t)i2c_master_send;
ret = adau1371_add_i2c_device(pdev, setup);
}
-#else
- /* other interfaces */
-#endif
dev_info(&pdev->dev, "codec initialized\n");
@@ -1142,10 +1135,8 @@
snd_soc_free_pcms(socdev);
snd_soc_dapm_free(socdev);
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
i2c_unregister_device(codec->control_data);
i2c_del_driver(&adau1371_i2c_driver);
-#endif
kfree(codec->private_data);
kfree(codec);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits