diff options
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_synth.c')
| -rw-r--r-- | sound/pci/emu10k1/emu10k1_synth.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c index 4c41c903a840..5457d5613f6b 100644 --- a/sound/pci/emu10k1/emu10k1_synth.c +++ b/sound/pci/emu10k1/emu10k1_synth.c | |||
| @@ -29,8 +29,9 @@ MODULE_LICENSE("GPL"); | |||
| 29 | /* | 29 | /* |
| 30 | * create a new hardware dependent device for Emu10k1 | 30 | * create a new hardware dependent device for Emu10k1 |
| 31 | */ | 31 | */ |
| 32 | static int snd_emu10k1_synth_new_device(struct snd_seq_device *dev) | 32 | static int snd_emu10k1_synth_probe(struct device *_dev) |
| 33 | { | 33 | { |
| 34 | struct snd_seq_device *dev = to_seq_dev(_dev); | ||
| 34 | struct snd_emux *emux; | 35 | struct snd_emux *emux; |
| 35 | struct snd_emu10k1 *hw; | 36 | struct snd_emu10k1 *hw; |
| 36 | struct snd_emu10k1_synth_arg *arg; | 37 | struct snd_emu10k1_synth_arg *arg; |
| @@ -79,8 +80,9 @@ static int snd_emu10k1_synth_new_device(struct snd_seq_device *dev) | |||
| 79 | return 0; | 80 | return 0; |
| 80 | } | 81 | } |
| 81 | 82 | ||
| 82 | static int snd_emu10k1_synth_delete_device(struct snd_seq_device *dev) | 83 | static int snd_emu10k1_synth_remove(struct device *_dev) |
| 83 | { | 84 | { |
| 85 | struct snd_seq_device *dev = to_seq_dev(_dev); | ||
| 84 | struct snd_emux *emux; | 86 | struct snd_emux *emux; |
| 85 | struct snd_emu10k1 *hw; | 87 | struct snd_emu10k1 *hw; |
| 86 | unsigned long flags; | 88 | unsigned long flags; |
| @@ -104,21 +106,14 @@ static int snd_emu10k1_synth_delete_device(struct snd_seq_device *dev) | |||
| 104 | * INIT part | 106 | * INIT part |
| 105 | */ | 107 | */ |
| 106 | 108 | ||
| 107 | static int __init alsa_emu10k1_synth_init(void) | 109 | static struct snd_seq_driver emu10k1_synth_driver = { |
| 108 | { | 110 | .driver = { |
| 109 | 111 | .name = KBUILD_MODNAME, | |
| 110 | static struct snd_seq_dev_ops ops = { | 112 | .probe = snd_emu10k1_synth_probe, |
| 111 | snd_emu10k1_synth_new_device, | 113 | .remove = snd_emu10k1_synth_remove, |
| 112 | snd_emu10k1_synth_delete_device, | 114 | }, |
| 113 | }; | 115 | .id = SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, |
| 114 | return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops, | 116 | .argsize = sizeof(struct snd_emu10k1_synth_arg), |
| 115 | sizeof(struct snd_emu10k1_synth_arg)); | 117 | }; |
| 116 | } | 118 | |
| 117 | 119 | module_snd_seq_driver(emu10k1_synth_driver); | |
| 118 | static void __exit alsa_emu10k1_synth_exit(void) | ||
| 119 | { | ||
| 120 | snd_seq_device_unregister_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH); | ||
| 121 | } | ||
| 122 | |||
| 123 | module_init(alsa_emu10k1_synth_init) | ||
| 124 | module_exit(alsa_emu10k1_synth_exit) | ||
