powermac.c (df9b42963f2d010ae3163a894ce22cf6b27cd344) powermac.c (15afafc2565bc785eb7a440b8b4a53f77910cf04)
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

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

46MODULE_PARM_DESC(enable_beep, "Enable beep using PCM.");
47
48static struct platform_device *device;
49
50
51/*
52 */
53
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

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

46MODULE_PARM_DESC(enable_beep, "Enable beep using PCM.");
47
48static struct platform_device *device;
49
50
51/*
52 */
53
54static int __devinit snd_pmac_probe(struct platform_device *devptr)
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);
62 if (err < 0)

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

131 return 0;
132
133__error:
134 snd_card_free(card);
135 return err;
136}
137
138
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);
62 if (err < 0)

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

131 return 0;
132
133__error:
134 snd_card_free(card);
135 return err;
136}
137
138
139static int __devexit snd_pmac_remove(struct platform_device *devptr)
139static int snd_pmac_remove(struct platform_device *devptr)
140{
141 snd_card_free(platform_get_drvdata(devptr));
142 platform_set_drvdata(devptr, NULL);
143 return 0;
144}
145
146#ifdef CONFIG_PM_SLEEP
147static int snd_pmac_driver_suspend(struct device *dev)

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

163#else
164#define SND_PMAC_PM_OPS NULL
165#endif
166
167#define SND_PMAC_DRIVER "snd_powermac"
168
169static struct platform_driver snd_pmac_driver = {
170 .probe = snd_pmac_probe,
140{
141 snd_card_free(platform_get_drvdata(devptr));
142 platform_set_drvdata(devptr, NULL);
143 return 0;
144}
145
146#ifdef CONFIG_PM_SLEEP
147static int snd_pmac_driver_suspend(struct device *dev)

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

163#else
164#define SND_PMAC_PM_OPS NULL
165#endif
166
167#define SND_PMAC_DRIVER "snd_powermac"
168
169static struct platform_driver snd_pmac_driver = {
170 .probe = snd_pmac_probe,
171 .remove = __devexit_p(snd_pmac_remove),
171 .remove = snd_pmac_remove,
172 .driver = {
173 .name = SND_PMAC_DRIVER,
174 .owner = THIS_MODULE,
175 .pm = SND_PMAC_PM_OPS,
176 },
177};
178
179static int __init alsa_card_pmac_init(void)

--- 19 unchanged lines hidden ---
172 .driver = {
173 .name = SND_PMAC_DRIVER,
174 .owner = THIS_MODULE,
175 .pm = SND_PMAC_PM_OPS,
176 },
177};
178
179static int __init alsa_card_pmac_init(void)

--- 19 unchanged lines hidden ---