powermac.c (42249094f79422fbf5ed4b54eeb48ff096809b8f) | powermac.c (1076879744d1b7709d5b7556cfe038039fbc01f9) |
---|---|
1/* 2 * Driver for PowerMac AWACS 3 * Copyright (c) 2001 by Takashi Iwai <tiwai@suse.de> 4 * based on dmasound.c. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 44 unchanged lines hidden (view full) --- 53 54static int snd_pmac_probe(struct platform_device *devptr) 55{ 56 struct snd_card *card; 57 struct snd_pmac *chip; 58 char *name_ext; 59 int err; 60 | 1/* 2 * Driver for PowerMac AWACS 3 * Copyright (c) 2001 by Takashi Iwai <tiwai@suse.de> 4 * based on dmasound.c. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 44 unchanged lines hidden (view full) --- 53 54static int snd_pmac_probe(struct platform_device *devptr) 55{ 56 struct snd_card *card; 57 struct snd_pmac *chip; 58 char *name_ext; 59 int err; 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) 63 return err; 64 65 if ((err = snd_pmac_new(card, &chip)) < 0) 66 goto __error; 67 card->private_data = chip; 68 69 switch (chip->model) { --- 47 unchanged lines hidden (view full) --- 117 118 if ((err = snd_pmac_pcm_new(chip)) < 0) 119 goto __error; 120 121 chip->initialized = 1; 122 if (enable_beep) 123 snd_pmac_attach_beep(chip); 124 | 62 if (err < 0) 63 return err; 64 65 if ((err = snd_pmac_new(card, &chip)) < 0) 66 goto __error; 67 card->private_data = chip; 68 69 switch (chip->model) { --- 47 unchanged lines hidden (view full) --- 117 118 if ((err = snd_pmac_pcm_new(chip)) < 0) 119 goto __error; 120 121 chip->initialized = 1; 122 if (enable_beep) 123 snd_pmac_attach_beep(chip); 124 |
125 snd_card_set_dev(card, &devptr->dev); 126 | |
127 if ((err = snd_card_register(card)) < 0) 128 goto __error; 129 130 platform_set_drvdata(devptr, card); 131 return 0; 132 133__error: 134 snd_card_free(card); --- 63 unchanged lines hidden --- | 125 if ((err = snd_card_register(card)) < 0) 126 goto __error; 127 128 platform_set_drvdata(devptr, card); 129 return 0; 130 131__error: 132 snd_card_free(card); --- 63 unchanged lines hidden --- |