aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-09-05 11:17:58 -0400
committerJaroslav Kysela <perex@suse.cz>2005-09-12 04:41:56 -0400
commit16dab54b8cbac39bd3f639db5d7d0fd8300a6cb0 (patch)
treea7e9f4561bb4df38222c2ef5a48d111f52cc5dd3 /sound/sparc
parentecbcfe36fa882e9f8f2be63ac0c42978336bf997 (diff)
[ALSA] Add snd_card_set_generic_dev() call
ARM,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,MIPS MIPS AU1x00 driver,PPC,PPC PowerMac driver,SPARC,SPARC AMD7930 driver SPARC cs4231 driver,SPARC DBRI driver - Added snd_card_set_generic_dev() call. - Added SND_GENERIC_DRIVER to Kconfig. - Clean up the error path in probe if necessary. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc')
-rw-r--r--sound/sparc/Kconfig3
-rw-r--r--sound/sparc/amd7930.c3
-rw-r--r--sound/sparc/cs4231.c3
-rw-r--r--sound/sparc/dbri.c29
4 files changed, 23 insertions, 15 deletions
diff --git a/sound/sparc/Kconfig b/sound/sparc/Kconfig
index 25a8a558ef92..09ab138646a6 100644
--- a/sound/sparc/Kconfig
+++ b/sound/sparc/Kconfig
@@ -7,6 +7,7 @@ config SND_SUN_AMD7930
7 tristate "Sun AMD7930" 7 tristate "Sun AMD7930"
8 depends on SBUS && SND 8 depends on SBUS && SND
9 select SND_PCM 9 select SND_PCM
10 select SND_GENERIC_DRIVER
10 help 11 help
11 Say Y here to include support for AMD7930 sound device on Sun. 12 Say Y here to include support for AMD7930 sound device on Sun.
12 13
@@ -17,6 +18,7 @@ config SND_SUN_CS4231
17 tristate "Sun CS4231" 18 tristate "Sun CS4231"
18 depends on SND 19 depends on SND
19 select SND_PCM 20 select SND_PCM
21 select SND_GENERIC_DRIVER
20 help 22 help
21 Say Y here to include support for CS4231 sound device on Sun. 23 Say Y here to include support for CS4231 sound device on Sun.
22 24
@@ -27,6 +29,7 @@ config SND_SUN_DBRI
27 tristate "Sun DBRI" 29 tristate "Sun DBRI"
28 depends on SND && SBUS 30 depends on SND && SBUS
29 select SND_PCM 31 select SND_PCM
32 select SND_GENERIC_DRIVER
30 help 33 help
31 Say Y here to include support for DBRI sound device on Sun. 34 Say Y here to include support for DBRI sound device on Sun.
32 35
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index bd8a850e93ea..ed0d5f2f0888 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -1088,6 +1088,9 @@ static int __init amd7930_attach(int prom_node, struct sbus_dev *sdev)
1088 if ((err = snd_amd7930_mixer(amd)) < 0) 1088 if ((err = snd_amd7930_mixer(amd)) < 0)
1089 goto out_err; 1089 goto out_err;
1090 1090
1091 if ((err = snd_card_set_generic_dev(card)) < 0)
1092 goto out_err;
1093
1091 if ((err = snd_card_register(card)) < 0) 1094 if ((err = snd_card_register(card)) < 0)
1092 goto out_err; 1095 goto out_err;
1093 1096
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 36f9fe4d7bea..bd169f541181 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -1915,6 +1915,9 @@ static int cs4231_attach_finish(snd_card_t *card, cs4231_t *chip)
1915 if ((err = snd_cs4231_timer(chip)) < 0) 1915 if ((err = snd_cs4231_timer(chip)) < 0)
1916 goto out_err; 1916 goto out_err;
1917 1917
1918 if ((err = snd_card_set_generic_dev(card)) < 0)
1919 goto out_err;
1920
1918 if ((err = snd_card_register(card)) < 0) 1921 if ((err = snd_card_register(card)) < 0)
1919 goto out_err; 1922 goto out_err;
1920 1923
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 941c7b1e7ebb..a56f81bb0049 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2657,26 +2657,20 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev)
2657 } 2657 }
2658 2658
2659 dbri = (snd_dbri_t *) card->private_data; 2659 dbri = (snd_dbri_t *) card->private_data;
2660 if ((err = snd_dbri_pcm(dbri)) < 0) { 2660 if ((err = snd_dbri_pcm(dbri)) < 0)
2661 snd_dbri_free(dbri); 2661 goto _err;
2662 snd_card_free(card);
2663 return err;
2664 }
2665 2662
2666 if ((err = snd_dbri_mixer(dbri)) < 0) { 2663 if ((err = snd_dbri_mixer(dbri)) < 0)
2667 snd_dbri_free(dbri); 2664 goto _err;
2668 snd_card_free(card);
2669 return err;
2670 }
2671 2665
2672 /* /proc file handling */ 2666 /* /proc file handling */
2673 snd_dbri_proc(dbri); 2667 snd_dbri_proc(dbri);
2674 2668
2675 if ((err = snd_card_register(card)) < 0) { 2669 if ((err = snd_card_set_generic_dev(card)) < 0)
2676 snd_dbri_free(dbri); 2670 goto _err;
2677 snd_card_free(card); 2671
2678 return err; 2672 if ((err = snd_card_register(card)) < 0)
2679 } 2673 goto _err;
2680 2674
2681 printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", 2675 printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n",
2682 dev, dbri->regs, 2676 dev, dbri->regs,
@@ -2684,6 +2678,11 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev)
2684 dev++; 2678 dev++;
2685 2679
2686 return 0; 2680 return 0;
2681
2682 _err:
2683 snd_dbri_free(dbri);
2684 snd_card_free(card);
2685 return err;
2687} 2686}
2688 2687
2689/* Probe for the dbri chip and then attach the driver. */ 2688/* Probe for the dbri chip and then attach the driver. */