aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-12 07:40:50 -0500
committerTakashi Iwai <tiwai@suse.de>2015-02-12 08:13:47 -0500
commitaf03c243a1f014145dae34368fe975b2f08ed964 (patch)
tree1f414301b2d7ea0a4e074e191c22dc88278cb2ab /include/sound
parent7c37ae5c625aaa4836466cfaea829a3199dfc571 (diff)
ALSA: seq: Clean up device and driver structs
Use const string pointer instead of copying the id string to each object. Also drop the status and list fields of snd_seq_device struct that are no longer used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/seq_device.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/sound/seq_device.h b/include/sound/seq_device.h
index ea256b825146..b13cd2930d32 100644
--- a/include/sound/seq_device.h
+++ b/include/sound/seq_device.h
@@ -25,24 +25,16 @@
25 * registered device information 25 * registered device information
26 */ 26 */
27 27
28#define ID_LEN 32
29
30/* status flag */
31#define SNDRV_SEQ_DEVICE_FREE 0
32#define SNDRV_SEQ_DEVICE_REGISTERED 1
33
34struct snd_seq_device { 28struct snd_seq_device {
35 /* device info */ 29 /* device info */
36 struct snd_card *card; /* sound card */ 30 struct snd_card *card; /* sound card */
37 int device; /* device number */ 31 int device; /* device number */
38 char id[ID_LEN]; /* driver id */ 32 const char *id; /* driver id */
39 char name[80]; /* device name */ 33 char name[80]; /* device name */
40 int argsize; /* size of the argument */ 34 int argsize; /* size of the argument */
41 void *driver_data; /* private data for driver */ 35 void *driver_data; /* private data for driver */
42 int status; /* flag - read only */
43 void *private_data; /* private data for the caller */ 36 void *private_data; /* private data for the caller */
44 void (*private_free)(struct snd_seq_device *device); 37 void (*private_free)(struct snd_seq_device *device);
45 struct list_head list; /* link to next device */
46 struct device dev; 38 struct device dev;
47}; 39};
48 40
@@ -75,9 +67,11 @@ void snd_seq_device_load_drivers(void);
75#else 67#else
76#define snd_seq_device_load_drivers() 68#define snd_seq_device_load_drivers()
77#endif 69#endif
78int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize, struct snd_seq_device **result); 70int snd_seq_device_new(struct snd_card *card, int device, const char *id,
79int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, int argsize); 71 int argsize, struct snd_seq_device **result);
80int snd_seq_device_unregister_driver(char *id); 72int snd_seq_device_register_driver(const char *id,
73 struct snd_seq_dev_ops *entry, int argsize);
74int snd_seq_device_unregister_driver(const char *id);
81 75
82#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device)) 76#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device))
83 77