summaryrefslogtreecommitdiffstats
path: root/sound/core/seq/oss/seq_oss_synth.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-12 13:43:22 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-12 14:15:54 +0100
commit056622053b8ae02978678ac1321b5bd956e7c812 (patch)
treee2c0602b6efd90dc7d6e760bd7cd4ab0567104ee /sound/core/seq/oss/seq_oss_synth.c
parentaf03c243a1f014145dae34368fe975b2f08ed964 (diff)
downloadlinux-056622053b8ae02978678ac1321b5bd956e7c812.tar.gz
linux-056622053b8ae02978678ac1321b5bd956e7c812.tar.bz2
linux-056622053b8ae02978678ac1321b5bd956e7c812.zip
ALSA: seq: Define driver object in each driver
This patch moves the driver object initialization and allocation to each driver's module init/exit code like other normal drivers. The snd_seq_driver struct is now published in seq_device.h, and each driver is responsible to define it with proper driver attributes (name, probe and remove) with snd_seq_driver specific attributes as id and argsize fields. The helper functions snd_seq_driver_register(), snd_seq_driver_unregister() and module_snd_seq_driver() are used for simplifying codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/oss/seq_oss_synth.c')
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 701feb71b700..835edc80f918 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -98,8 +98,9 @@ snd_seq_oss_synth_init(void)
* registration of the synth device
*/
int
-snd_seq_oss_synth_register(struct snd_seq_device *dev)
+snd_seq_oss_synth_probe(struct device *_dev)
{
+ struct snd_seq_device *dev = to_seq_dev(_dev);
int i;
struct seq_oss_synth *rec;
struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
@@ -149,8 +150,9 @@ snd_seq_oss_synth_register(struct snd_seq_device *dev)
int
-snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
+snd_seq_oss_synth_remove(struct device *_dev)
{
+ struct snd_seq_device *dev = to_seq_dev(_dev);
int index;
struct seq_oss_synth *rec = dev->driver_data;
unsigned long flags;