aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 08:38:59 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-14 02:14:06 -0500
commit1076879744d1b7709d5b7556cfe038039fbc01f9 (patch)
tree0aa758cb989c2763e4c4e7b0aa94fb3c280dddcc
parent5815f5550b7f0dba3459cdb56c4977715fca3468 (diff)
ALSA: ppc: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/aoa/core/alsa.c5
-rw-r--r--sound/ppc/powermac.c4
-rw-r--r--sound/ppc/snd_ps3.c4
3 files changed, 5 insertions, 8 deletions
diff --git a/sound/aoa/core/alsa.c b/sound/aoa/core/alsa.c
index 0fa3855b4790..9913bf222073 100644
--- a/sound/aoa/core/alsa.c
+++ b/sound/aoa/core/alsa.c
@@ -23,13 +23,12 @@ int aoa_alsa_init(char *name, struct module *mod, struct device *dev)
23 /* cannot be EEXIST due to usage in aoa_fabric_register */ 23 /* cannot be EEXIST due to usage in aoa_fabric_register */
24 return -EBUSY; 24 return -EBUSY;
25 25
26 err = snd_card_create(index, name, mod, sizeof(struct aoa_card), 26 err = snd_card_new(dev, index, name, mod, sizeof(struct aoa_card),
27 &alsa_card); 27 &alsa_card);
28 if (err < 0) 28 if (err < 0)
29 return err; 29 return err;
30 aoa_card = alsa_card->private_data; 30 aoa_card = alsa_card->private_data;
31 aoa_card->alsa_card = alsa_card; 31 aoa_card->alsa_card = alsa_card;
32 alsa_card->dev = dev;
33 strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver)); 32 strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver));
34 strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname)); 33 strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname));
35 strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname)); 34 strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname));
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c
index 8abb521b4814..350a7c8f86dd 100644
--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -58,7 +58,7 @@ static int snd_pmac_probe(struct platform_device *devptr)
58 char *name_ext; 58 char *name_ext;
59 int err; 59 int err;
60 60
61 err = snd_card_create(index, id, THIS_MODULE, 0, &card); 61 err = snd_card_new(&devptr->dev, index, id, THIS_MODULE, 0, &card);
62 if (err < 0) 62 if (err < 0)
63 return err; 63 return err;
64 64
@@ -122,8 +122,6 @@ static int snd_pmac_probe(struct platform_device *devptr)
122 if (enable_beep) 122 if (enable_beep)
123 snd_pmac_attach_beep(chip); 123 snd_pmac_attach_beep(chip);
124 124
125 snd_card_set_dev(card, &devptr->dev);
126
127 if ((err = snd_card_register(card)) < 0) 125 if ((err = snd_card_register(card)) < 0)
128 goto __error; 126 goto __error;
129 127
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index ebb76f2d90d7..58f292a87f98 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -984,7 +984,8 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
984 } 984 }
985 985
986 /* create card instance */ 986 /* create card instance */
987 ret = snd_card_create(index, id, THIS_MODULE, 0, &the_card.card); 987 ret = snd_card_new(&dev->core, index, id, THIS_MODULE,
988 0, &the_card.card);
988 if (ret < 0) 989 if (ret < 0)
989 goto clean_irq; 990 goto clean_irq;
990 991
@@ -1052,7 +1053,6 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
1052 snd_ps3_init_avsetting(&the_card); 1053 snd_ps3_init_avsetting(&the_card);
1053 1054
1054 /* register the card */ 1055 /* register the card */
1055 snd_card_set_dev(the_card.card, &dev->core);
1056 ret = snd_card_register(the_card.card); 1056 ret = snd_card_register(the_card.card);
1057 if (ret < 0) 1057 if (ret < 0)
1058 goto clean_dma_map; 1058 goto clean_dma_map;