alsa.c (b2576e1d4408e134e2188c967b1f28af39cd79d4) alsa.c (bd7dd77c2a05c530684eea2e3af16449ae9c5d52)
1/*
2 * Apple Onboard Audio Alsa helpers
3 *
4 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
5 *
6 * GPL v2, can be found in COPYING.
7 */
8#include <linux/module.h>

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

18{
19 struct snd_card *alsa_card;
20 int err;
21
22 if (aoa_card)
23 /* cannot be EEXIST due to usage in aoa_fabric_register */
24 return -EBUSY;
25
1/*
2 * Apple Onboard Audio Alsa helpers
3 *
4 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
5 *
6 * GPL v2, can be found in COPYING.
7 */
8#include <linux/module.h>

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

18{
19 struct snd_card *alsa_card;
20 int err;
21
22 if (aoa_card)
23 /* cannot be EEXIST due to usage in aoa_fabric_register */
24 return -EBUSY;
25
26 alsa_card = snd_card_new(index, name, mod, sizeof(struct aoa_card));
27 if (!alsa_card)
28 return -ENOMEM;
26 err = snd_card_create(index, name, mod, sizeof(struct aoa_card),
27 &alsa_card);
28 if (err < 0)
29 return err;
29 aoa_card = alsa_card->private_data;
30 aoa_card->alsa_card = alsa_card;
31 alsa_card->dev = dev;
32 strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver));
33 strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname));
34 strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname));
35 strlcpy(alsa_card->mixername, name, sizeof(alsa_card->mixername));
36 err = snd_card_register(aoa_card->alsa_card);

--- 63 unchanged lines hidden ---
30 aoa_card = alsa_card->private_data;
31 aoa_card->alsa_card = alsa_card;
32 alsa_card->dev = dev;
33 strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver));
34 strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname));
35 strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname));
36 strlcpy(alsa_card->mixername, name, sizeof(alsa_card->mixername));
37 err = snd_card_register(aoa_card->alsa_card);

--- 63 unchanged lines hidden ---