diff options
Diffstat (limited to 'sound/isa/sb/emu8000_synth.c')
-rw-r--r-- | sound/isa/sb/emu8000_synth.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c index 72332dfada9a..4aa719cad331 100644 --- a/sound/isa/sb/emu8000_synth.c +++ b/sound/isa/sb/emu8000_synth.c | |||
@@ -34,8 +34,9 @@ MODULE_LICENSE("GPL"); | |||
34 | /* | 34 | /* |
35 | * create a new hardware dependent device for Emu8000 | 35 | * create a new hardware dependent device for Emu8000 |
36 | */ | 36 | */ |
37 | static int snd_emu8000_new_device(struct snd_seq_device *dev) | 37 | static int snd_emu8000_probe(struct device *_dev) |
38 | { | 38 | { |
39 | struct snd_seq_device *dev = to_seq_dev(_dev); | ||
39 | struct snd_emu8000 *hw; | 40 | struct snd_emu8000 *hw; |
40 | struct snd_emux *emu; | 41 | struct snd_emux *emu; |
41 | 42 | ||
@@ -93,8 +94,9 @@ static int snd_emu8000_new_device(struct snd_seq_device *dev) | |||
93 | /* | 94 | /* |
94 | * free all resources | 95 | * free all resources |
95 | */ | 96 | */ |
96 | static int snd_emu8000_delete_device(struct snd_seq_device *dev) | 97 | static int snd_emu8000_remove(struct device *_dev) |
97 | { | 98 | { |
99 | struct snd_seq_device *dev = to_seq_dev(_dev); | ||
98 | struct snd_emu8000 *hw; | 100 | struct snd_emu8000 *hw; |
99 | 101 | ||
100 | if (dev->driver_data == NULL) | 102 | if (dev->driver_data == NULL) |
@@ -114,21 +116,14 @@ static int snd_emu8000_delete_device(struct snd_seq_device *dev) | |||
114 | * INIT part | 116 | * INIT part |
115 | */ | 117 | */ |
116 | 118 | ||
117 | static int __init alsa_emu8000_init(void) | 119 | static struct snd_seq_driver emu8000_driver = { |
118 | { | 120 | .driver = { |
119 | 121 | .name = KBUILD_MODNAME, | |
120 | static struct snd_seq_dev_ops ops = { | 122 | .probe = snd_emu8000_probe, |
121 | snd_emu8000_new_device, | 123 | .remove = snd_emu8000_remove, |
122 | snd_emu8000_delete_device, | 124 | }, |
123 | }; | 125 | .id = SNDRV_SEQ_DEV_ID_EMU8000, |
124 | return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops, | 126 | .argsize = sizeof(struct snd_emu8000 *), |
125 | sizeof(struct snd_emu8000*)); | 127 | }; |
126 | } | 128 | |
127 | 129 | module_snd_seq_driver(emu8000_driver); | |
128 | static void __exit alsa_emu8000_exit(void) | ||
129 | { | ||
130 | snd_seq_device_unregister_driver(SNDRV_SEQ_DEV_ID_EMU8000); | ||
131 | } | ||
132 | |||
133 | module_init(alsa_emu8000_init) | ||
134 | module_exit(alsa_emu8000_exit) | ||