aboutsummaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-11-20 14:03:48 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:29:14 +0100
commit2af677fc884fc6dc79e65c99050ea607ac8bab9b (patch)
tree4291d36c2f116d5887b88da5f0213b68933a1201 /include/sound
parenta106cd3d9e88c8761bd0eac2ce402cc82bd11fea (diff)
[ALSA] dynamic minors (1/6): store device type in struct snd_minor
Instead of a comment string, store the device type in the snd_minor structure. This makes snd_minor more flexible, and has the nice side effect that we don't need anymore to create a separate snd_minor template for registering a device but can pass the file_operations directly to snd_register_device(). Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/core.h8
-rw-r--r--include/sound/pcm.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index f00b9c9b567..f557c8ac450 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -185,8 +185,8 @@ static inline int snd_power_wait(struct snd_card *card, unsigned int state, stru
struct snd_minor {
struct list_head list; /* list of all minors per card */
int number; /* minor number */
+ int type; /* SNDRV_DEVICE_TYPE_XXX */
int device; /* device number */
- const char *comment; /* for /proc/asound/devices */
struct file_operations *f_ops; /* file operations */
char name[0]; /* device name (keep at the end of
structure) */
@@ -199,11 +199,13 @@ extern int snd_ecards_limit;
void snd_request_card(int card);
-int snd_register_device(int type, struct snd_card *card, int dev, struct snd_minor *reg, const char *name);
+int snd_register_device(int type, struct snd_card *card, int dev,
+ struct file_operations *f_ops, const char *name);
int snd_unregister_device(int type, struct snd_card *card, int dev);
#ifdef CONFIG_SND_OSSEMUL
-int snd_register_oss_device(int type, struct snd_card *card, int dev, struct snd_minor *reg, const char *name);
+int snd_register_oss_device(int type, struct snd_card *card, int dev,
+ struct file_operations *f_ops, const char *name);
int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
#endif
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 7e77c0add80..5e29b0e0f21 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -402,7 +402,6 @@ struct snd_pcm_str {
struct snd_pcm_oss_stream oss;
#endif
struct snd_pcm_file *files;
- struct snd_minor *reg;
struct snd_info_entry *proc_root;
struct snd_info_entry *proc_info_entry;
#ifdef CONFIG_SND_DEBUG
@@ -441,7 +440,7 @@ struct snd_pcm_notify {
*/
extern struct snd_pcm *snd_pcm_devices[];
-extern struct snd_minor snd_pcm_reg[2];
+extern struct file_operations snd_pcm_f_ops[2];
int snd_pcm_new(struct snd_card *card, char *id, int device,
int playback_count, int capture_count,