aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/serial-u16550.c
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/drivers/serial-u16550.c
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/drivers/serial-u16550.c')
-rw-r--r--sound/drivers/serial-u16550.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 986df35fb829..fd3bb9dd1d24 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -928,15 +928,11 @@ static int __init snd_serial_probe(int dev)
928 base[dev], 928 base[dev],
929 adaptor[dev], 929 adaptor[dev],
930 droponfull[dev], 930 droponfull[dev],
931 &uart)) < 0) { 931 &uart)) < 0)
932 snd_card_free(card); 932 goto _err;
933 return err;
934 }
935 933
936 if ((err = snd_uart16550_rmidi(uart, 0, outs[dev], ins[dev], &uart->rmidi)) < 0) { 934 if ((err = snd_uart16550_rmidi(uart, 0, outs[dev], ins[dev], &uart->rmidi)) < 0)
937 snd_card_free(card); 935 goto _err;
938 return err;
939 }
940 936
941 sprintf(card->longname, "%s at 0x%lx, irq %d speed %d div %d outs %d ins %d adaptor %s droponfull %d", 937 sprintf(card->longname, "%s at 0x%lx, irq %d speed %d div %d outs %d ins %d adaptor %s droponfull %d",
942 card->shortname, 938 card->shortname,
@@ -949,12 +945,18 @@ static int __init snd_serial_probe(int dev)
949 adaptor_names[uart->adaptor], 945 adaptor_names[uart->adaptor],
950 uart->drop_on_full); 946 uart->drop_on_full);
951 947
952 if ((err = snd_card_register(card)) < 0) { 948 if ((err = snd_card_set_generic_dev(card)) < 0)
953 snd_card_free(card); 949 goto _err;
954 return err; 950
955 } 951 if ((err = snd_card_register(card)) < 0)
952 goto _err;
953
956 snd_serial_cards[dev] = card; 954 snd_serial_cards[dev] = card;
957 return 0; 955 return 0;
956
957 _err:
958 snd_card_free(card);
959 return err;
958} 960}
959 961
960static int __init alsa_card_serial_init(void) 962static int __init alsa_card_serial_init(void)