diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-09-01 13:47:04 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-09-04 04:34:30 -0400 |
commit | b7c9d8520564eca89da8733e5248c7ce8ee8e1b0 (patch) | |
tree | 2788d304f3e00e91cbaec157291270105af7e52a | |
parent | d2a403553ba7659d85dae2a05b1f3767d2fefcfe (diff) |
ALSA: ASoC: Don't suggest compile time selection of codec access
Currently the boiler plate code used by most ASoC codecs to provide a
placeholder for SPI access suggests making the selection of SPI a
compile time option which is suboptimal when trying to build kernels
supporting multiple systems. Change this template to suggest allowing
runtime selection instead.
Leave the drivers not yet converted to new style I2C access for now to
avoid collisions.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | sound/soc/codecs/ak4535.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/uda1380.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8750.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index e512cd79d767..088cf9927720 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -622,7 +622,7 @@ static int ak4535_probe(struct platform_device *pdev) | |||
622 | struct ak4535_setup_data *setup; | 622 | struct ak4535_setup_data *setup; |
623 | struct snd_soc_codec *codec; | 623 | struct snd_soc_codec *codec; |
624 | struct ak4535_priv *ak4535; | 624 | struct ak4535_priv *ak4535; |
625 | int ret = 0; | 625 | int ret; |
626 | 626 | ||
627 | printk(KERN_INFO "AK4535 Audio Codec %s", AK4535_VERSION); | 627 | printk(KERN_INFO "AK4535 Audio Codec %s", AK4535_VERSION); |
628 | 628 | ||
@@ -644,14 +644,14 @@ static int ak4535_probe(struct platform_device *pdev) | |||
644 | INIT_LIST_HEAD(&codec->dapm_paths); | 644 | INIT_LIST_HEAD(&codec->dapm_paths); |
645 | 645 | ||
646 | ak4535_socdev = socdev; | 646 | ak4535_socdev = socdev; |
647 | ret = -ENODEV; | ||
648 | |||
647 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 649 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
648 | if (setup->i2c_address) { | 650 | if (setup->i2c_address) { |
649 | codec->hw_write = (hw_write_t)i2c_master_send; | 651 | codec->hw_write = (hw_write_t)i2c_master_send; |
650 | codec->hw_read = (hw_read_t)i2c_master_recv; | 652 | codec->hw_read = (hw_read_t)i2c_master_recv; |
651 | ret = ak4535_add_i2c_device(pdev, setup); | 653 | ret = ak4535_add_i2c_device(pdev, setup); |
652 | } | 654 | } |
653 | #else | ||
654 | /* Add other interfaces here */ | ||
655 | #endif | 655 | #endif |
656 | 656 | ||
657 | if (ret != 0) { | 657 | if (ret != 0) { |
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index f0c80436b975..d206d7f892b6 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -788,7 +788,7 @@ static int uda1380_probe(struct platform_device *pdev) | |||
788 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 788 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
789 | struct uda1380_setup_data *setup; | 789 | struct uda1380_setup_data *setup; |
790 | struct snd_soc_codec *codec; | 790 | struct snd_soc_codec *codec; |
791 | int ret = 0; | 791 | int ret; |
792 | 792 | ||
793 | pr_info("UDA1380 Audio Codec %s", UDA1380_VERSION); | 793 | pr_info("UDA1380 Audio Codec %s", UDA1380_VERSION); |
794 | 794 | ||
@@ -803,13 +803,13 @@ static int uda1380_probe(struct platform_device *pdev) | |||
803 | INIT_LIST_HEAD(&codec->dapm_paths); | 803 | INIT_LIST_HEAD(&codec->dapm_paths); |
804 | 804 | ||
805 | uda1380_socdev = socdev; | 805 | uda1380_socdev = socdev; |
806 | ret = -ENODEV; | ||
807 | |||
806 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 808 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
807 | if (setup->i2c_address) { | 809 | if (setup->i2c_address) { |
808 | codec->hw_write = (hw_write_t)i2c_master_send; | 810 | codec->hw_write = (hw_write_t)i2c_master_send; |
809 | ret = uda1380_add_i2c_device(pdev, setup); | 811 | ret = uda1380_add_i2c_device(pdev, setup); |
810 | } | 812 | } |
811 | #else | ||
812 | /* Add other interfaces here */ | ||
813 | #endif | 813 | #endif |
814 | 814 | ||
815 | if (ret != 0) | 815 | if (ret != 0) |
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 34d846587759..9847aa064d6b 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -934,7 +934,7 @@ static int wm8750_probe(struct platform_device *pdev) | |||
934 | struct wm8750_setup_data *setup = socdev->codec_data; | 934 | struct wm8750_setup_data *setup = socdev->codec_data; |
935 | struct snd_soc_codec *codec; | 935 | struct snd_soc_codec *codec; |
936 | struct wm8750_priv *wm8750; | 936 | struct wm8750_priv *wm8750; |
937 | int ret = 0; | 937 | int ret; |
938 | 938 | ||
939 | pr_info("WM8750 Audio Codec %s", WM8750_VERSION); | 939 | pr_info("WM8750 Audio Codec %s", WM8750_VERSION); |
940 | codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); | 940 | codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); |
@@ -955,13 +955,13 @@ static int wm8750_probe(struct platform_device *pdev) | |||
955 | wm8750_socdev = socdev; | 955 | wm8750_socdev = socdev; |
956 | INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work); | 956 | INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work); |
957 | 957 | ||
958 | ret = -ENODEV; | ||
959 | |||
958 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 960 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
959 | if (setup->i2c_address) { | 961 | if (setup->i2c_address) { |
960 | codec->hw_write = (hw_write_t)i2c_master_send; | 962 | codec->hw_write = (hw_write_t)i2c_master_send; |
961 | ret = wm8750_add_i2c_device(pdev, setup); | 963 | ret = wm8750_add_i2c_device(pdev, setup); |
962 | } | 964 | } |
963 | #else | ||
964 | /* Add other interfaces here */ | ||
965 | #endif | 965 | #endif |
966 | 966 | ||
967 | if (ret != 0) { | 967 | if (ret != 0) { |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index e1bb5059755a..63410d7b5efb 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1565,7 +1565,7 @@ static int wm8990_probe(struct platform_device *pdev) | |||
1565 | struct wm8990_setup_data *setup; | 1565 | struct wm8990_setup_data *setup; |
1566 | struct snd_soc_codec *codec; | 1566 | struct snd_soc_codec *codec; |
1567 | struct wm8990_priv *wm8990; | 1567 | struct wm8990_priv *wm8990; |
1568 | int ret = 0; | 1568 | int ret; |
1569 | 1569 | ||
1570 | pr_info("WM8990 Audio Codec %s\n", WM8990_VERSION); | 1570 | pr_info("WM8990 Audio Codec %s\n", WM8990_VERSION); |
1571 | 1571 | ||
@@ -1587,13 +1587,13 @@ static int wm8990_probe(struct platform_device *pdev) | |||
1587 | INIT_LIST_HEAD(&codec->dapm_paths); | 1587 | INIT_LIST_HEAD(&codec->dapm_paths); |
1588 | wm8990_socdev = socdev; | 1588 | wm8990_socdev = socdev; |
1589 | 1589 | ||
1590 | ret = -ENODEV; | ||
1591 | |||
1590 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 1592 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
1591 | if (setup->i2c_address) { | 1593 | if (setup->i2c_address) { |
1592 | codec->hw_write = (hw_write_t)i2c_master_send; | 1594 | codec->hw_write = (hw_write_t)i2c_master_send; |
1593 | ret = wm8990_add_i2c_device(pdev, setup); | 1595 | ret = wm8990_add_i2c_device(pdev, setup); |
1594 | } | 1596 | } |
1595 | #else | ||
1596 | /* Add other interfaces here */ | ||
1597 | #endif | 1597 | #endif |
1598 | 1598 | ||
1599 | if (ret != 0) { | 1599 | if (ret != 0) { |