ad1848.c (762f99f4f3cb41a775b5157dd761217beba65873) ad1848.c (60a9c7f7fb98163150964236e07bc57e731ad4f2)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Generic driver for AD1848/AD1847/CS4248 chips (0.1 Alpha)
4 * Copyright (c) by Tugrul Galatali <galatalt@stuy.edu>,
5 * Jaroslav Kysela <perex@perex.cz>
6 * Based on card-4232.c by Jaroslav Kysela <perex@perex.cz>
7 */
8

--- 82 unchanged lines hidden (view full) ---

91 error = snd_wss_mixer(chip);
92 if (error < 0)
93 return error;
94
95 strscpy(card->driver, "AD1848", sizeof(card->driver));
96 strscpy(card->shortname, chip->pcm->name, sizeof(card->shortname));
97
98 if (!thinkpad[n])
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Generic driver for AD1848/AD1847/CS4248 chips (0.1 Alpha)
4 * Copyright (c) by Tugrul Galatali <galatalt@stuy.edu>,
5 * Jaroslav Kysela <perex@perex.cz>
6 * Based on card-4232.c by Jaroslav Kysela <perex@perex.cz>
7 */
8

--- 82 unchanged lines hidden (view full) ---

91 error = snd_wss_mixer(chip);
92 if (error < 0)
93 return error;
94
95 strscpy(card->driver, "AD1848", sizeof(card->driver));
96 strscpy(card->shortname, chip->pcm->name, sizeof(card->shortname));
97
98 if (!thinkpad[n])
99 snprintf(card->longname, sizeof(card->longname),
100 "%s at 0x%lx, irq %d, dma %d",
101 chip->pcm->name, chip->port, irq[n], dma1[n]);
99 scnprintf(card->longname, sizeof(card->longname),
100 "%s at 0x%lx, irq %d, dma %d",
101 chip->pcm->name, chip->port, irq[n], dma1[n]);
102 else
102 else
103 snprintf(card->longname, sizeof(card->longname),
104 "%s at 0x%lx, irq %d, dma %d [Thinkpad]",
105 chip->pcm->name, chip->port, irq[n], dma1[n]);
103 scnprintf(card->longname, sizeof(card->longname),
104 "%s at 0x%lx, irq %d, dma %d [Thinkpad]",
105 chip->pcm->name, chip->port, irq[n], dma1[n]);
106
107 error = snd_card_register(card);
108 if (error < 0)
109 return error;
110
111 dev_set_drvdata(dev, card);
112 return 0;
113}

--- 36 unchanged lines hidden ---
106
107 error = snd_card_register(card);
108 if (error < 0)
109 return error;
110
111 dev_set_drvdata(dev, card);
112 return 0;
113}

--- 36 unchanged lines hidden ---