Skip to content

Commit

Permalink
ALSA: seq: Rewrite sequencer device binding with standard bus
Browse files Browse the repository at this point in the history
We've used the old house-made code for binding the sequencer device
and driver.  This can be far better implemented with the standard
bus nowadays.

This patch refactors the whole sequencer binding code with the bus
/sys/bus/snd_seq.  The devices appear as id-card-device on this bus
and are bound with the drivers corresponding to the given id like the
former implementation.  The module autoload is also kept like before.

There is no change in API functions by this patch, and almost all
transitions are kept inside seq_device.c.  The proc file output will
change slightly but kept compatible as much as possible.

Further integration works will follow in later patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Feb 12, 2015
1 parent 72496ed commit 7c37ae5
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 374 deletions.
3 changes: 3 additions & 0 deletions include/sound/seq_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ struct snd_seq_device {
void *private_data; /* private data for the caller */
void (*private_free)(struct snd_seq_device *device);
struct list_head list; /* link to next device */
struct device dev;
};

#define to_seq_dev(_dev) \
container_of(_dev, struct snd_seq_device, dev)

/* driver operators
* init_device:
Expand Down
Loading

0 comments on commit 7c37ae5

Please sign in to comment.