Skip to content

Commit 080dece

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[ALSA] Remove xxx_t typedefs: Sequencer OSS-emulation
Modules: ALSA<-OSS sequencer,ALSA sequencer Remove xxx_t typedefs from the core sequencer OSS-emulation codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 19ac31e commit 080dece

18 files changed

Lines changed: 352 additions & 365 deletions

‎include/sound/seq_oss.h‎

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,17 @@
2424
#include "asequencer.h"
2525
#include "seq_kernel.h"
2626

27-
/*
28-
* type definitions
29-
*/
30-
typedef struct snd_seq_oss_arg_t snd_seq_oss_arg_t;
31-
typedef struct snd_seq_oss_callback_t snd_seq_oss_callback_t;
32-
3327
/*
3428
* argument structure for synthesizer operations
3529
*/
36-
struct snd_seq_oss_arg_t {
30+
struct snd_seq_oss_arg {
3731
/* given by OSS sequencer */
3832
int app_index; /* application unique index */
3933
int file_mode; /* file mode - see below */
4034
int seq_mode; /* sequencer mode - see below */
4135

4236
/* following must be initialized in open callback */
43-
snd_seq_addr_t addr; /* opened port address */
37+
struct snd_seq_addr addr; /* opened port address */
4438
void *private_data; /* private data for lowlevel drivers */
4539

4640
/* note-on event passing mode: initially given by OSS seq,
@@ -53,14 +47,14 @@ struct snd_seq_oss_arg_t {
5347
/*
5448
* synthesizer operation callbacks
5549
*/
56-
struct snd_seq_oss_callback_t {
50+
struct snd_seq_oss_callback {
5751
struct module *owner;
58-
int (*open)(snd_seq_oss_arg_t *p, void *closure);
59-
int (*close)(snd_seq_oss_arg_t *p);
60-
int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg);
61-
int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char __user *buf, int offs, int count);
62-
int (*reset)(snd_seq_oss_arg_t *p);
63-
int (*raw_event)(snd_seq_oss_arg_t *p, unsigned char *data);
52+
int (*open)(struct snd_seq_oss_arg *p, void *closure);
53+
int (*close)(struct snd_seq_oss_arg *p);
54+
int (*ioctl)(struct snd_seq_oss_arg *p, unsigned int cmd, unsigned long arg);
55+
int (*load_patch)(struct snd_seq_oss_arg *p, int format, const char __user *buf, int offs, int count);
56+
int (*reset)(struct snd_seq_oss_arg *p);
57+
int (*raw_event)(struct snd_seq_oss_arg *p, unsigned char *data);
6458
};
6559

6660
/* flag: file_mode */
@@ -88,13 +82,13 @@ struct snd_seq_oss_callback_t {
8882
/*
8983
* data pointer to snd_seq_register_device
9084
*/
91-
typedef struct snd_seq_oss_reg {
85+
struct snd_seq_oss_reg {
9286
int type;
9387
int subtype;
9488
int nvoices;
95-
snd_seq_oss_callback_t oper;
89+
struct snd_seq_oss_callback oper;
9690
void *private_data;
97-
} snd_seq_oss_reg_t;
91+
};
9892

9993
/* device id */
10094
#define SNDRV_SEQ_DEV_ID_OSS "seq-oss"

‎sound/core/seq/oss/seq_oss.c‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static ssize_t odev_write(struct file *file, const char __user *buf, size_t coun
6262
static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
6363
static unsigned int odev_poll(struct file *file, poll_table * wait);
6464
#ifdef CONFIG_PROC_FS
65-
static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf);
65+
static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf);
6666
#endif
6767

6868

@@ -73,7 +73,7 @@ static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf);
7373
static int __init alsa_seq_oss_init(void)
7474
{
7575
int rc;
76-
static snd_seq_dev_ops_t ops = {
76+
static struct snd_seq_dev_ops ops = {
7777
snd_seq_oss_synth_register,
7878
snd_seq_oss_synth_unregister,
7979
};
@@ -92,7 +92,7 @@ static int __init alsa_seq_oss_init(void)
9292
}
9393

9494
if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops,
95-
sizeof(snd_seq_oss_reg_t))) < 0) {
95+
sizeof(struct snd_seq_oss_reg))) < 0) {
9696
snd_seq_oss_delete_client();
9797
unregister_proc();
9898
unregister_device();
@@ -144,7 +144,7 @@ odev_open(struct inode *inode, struct file *file)
144144
static int
145145
odev_release(struct inode *inode, struct file *file)
146146
{
147-
seq_oss_devinfo_t *dp;
147+
struct seq_oss_devinfo *dp;
148148

149149
if ((dp = file->private_data) == NULL)
150150
return 0;
@@ -161,7 +161,7 @@ odev_release(struct inode *inode, struct file *file)
161161
static ssize_t
162162
odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
163163
{
164-
seq_oss_devinfo_t *dp;
164+
struct seq_oss_devinfo *dp;
165165
dp = file->private_data;
166166
snd_assert(dp != NULL, return -EIO);
167167
return snd_seq_oss_read(dp, buf, count);
@@ -171,7 +171,7 @@ odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
171171
static ssize_t
172172
odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
173173
{
174-
seq_oss_devinfo_t *dp;
174+
struct seq_oss_devinfo *dp;
175175
dp = file->private_data;
176176
snd_assert(dp != NULL, return -EIO);
177177
return snd_seq_oss_write(dp, buf, count, file);
@@ -180,7 +180,7 @@ odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offs
180180
static long
181181
odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
182182
{
183-
seq_oss_devinfo_t *dp;
183+
struct seq_oss_devinfo *dp;
184184
dp = file->private_data;
185185
snd_assert(dp != NULL, return -EIO);
186186
return snd_seq_oss_ioctl(dp, cmd, arg);
@@ -195,7 +195,7 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
195195
static unsigned int
196196
odev_poll(struct file *file, poll_table * wait)
197197
{
198-
seq_oss_devinfo_t *dp;
198+
struct seq_oss_devinfo *dp;
199199
dp = file->private_data;
200200
snd_assert(dp != NULL, return 0);
201201
return snd_seq_oss_poll(dp, file, wait);
@@ -217,7 +217,7 @@ static struct file_operations seq_oss_f_ops =
217217
.compat_ioctl = odev_ioctl_compat,
218218
};
219219

220-
static snd_minor_t seq_oss_reg = {
220+
static struct snd_minor seq_oss_reg = {
221221
.comment = "sequencer",
222222
.f_ops = &seq_oss_f_ops,
223223
};
@@ -268,10 +268,10 @@ unregister_device(void)
268268

269269
#ifdef CONFIG_PROC_FS
270270

271-
static snd_info_entry_t *info_entry;
271+
static struct snd_info_entry *info_entry;
272272

273273
static void
274-
info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf)
274+
info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf)
275275
{
276276
down(&register_mutex);
277277
snd_iprintf(buf, "OSS sequencer emulation version %s\n", SNDRV_SEQ_OSS_VERSION_STR);
@@ -287,7 +287,7 @@ static int __init
287287
register_proc(void)
288288
{
289289
#ifdef CONFIG_PROC_FS
290-
snd_info_entry_t *entry;
290+
struct snd_info_entry *entry;
291291

292292
entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root);
293293
if (entry == NULL)

‎sound/core/seq/oss/seq_oss_device.h‎

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,32 +55,24 @@
5555
* type definitions
5656
*/
5757

58-
typedef struct seq_oss_devinfo_t seq_oss_devinfo_t;
59-
typedef struct seq_oss_writeq_t seq_oss_writeq_t;
60-
typedef struct seq_oss_readq_t seq_oss_readq_t;
61-
typedef struct seq_oss_timer_t seq_oss_timer_t;
62-
typedef struct seq_oss_synthinfo_t seq_oss_synthinfo_t;
63-
typedef struct seq_oss_synth_sysex_t seq_oss_synth_sysex_t;
64-
typedef struct seq_oss_chinfo_t seq_oss_chinfo_t;
6558
typedef unsigned int reltime_t;
6659
typedef unsigned int abstime_t;
67-
typedef union evrec_t evrec_t;
6860

6961

7062
/*
7163
* synthesizer channel information
7264
*/
73-
struct seq_oss_chinfo_t {
65+
struct seq_oss_chinfo {
7466
int note, vel;
7567
};
7668

7769
/*
7870
* synthesizer information
7971
*/
80-
struct seq_oss_synthinfo_t {
81-
snd_seq_oss_arg_t arg;
82-
seq_oss_chinfo_t *ch;
83-
seq_oss_synth_sysex_t *sysex;
72+
struct seq_oss_synthinfo {
73+
struct snd_seq_oss_arg arg;
74+
struct seq_oss_chinfo *ch;
75+
struct seq_oss_synth_sysex *sysex;
8476
int nr_voices;
8577
int opened;
8678
int is_midi;
@@ -92,14 +84,14 @@ struct seq_oss_synthinfo_t {
9284
* sequencer client information
9385
*/
9486

95-
struct seq_oss_devinfo_t {
87+
struct seq_oss_devinfo {
9688

9789
int index; /* application index */
9890
int cseq; /* sequencer client number */
9991
int port; /* sequencer port number */
10092
int queue; /* sequencer queue number */
10193

102-
snd_seq_addr_t addr; /* address of this device */
94+
struct snd_seq_addr addr; /* address of this device */
10395

10496
int seq_mode; /* sequencer mode */
10597
int file_mode; /* file access */
@@ -109,17 +101,17 @@ struct seq_oss_devinfo_t {
109101

110102
/* synth device table */
111103
int max_synthdev;
112-
seq_oss_synthinfo_t synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
104+
struct seq_oss_synthinfo synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
113105
int synth_opened;
114106

115107
/* output queue */
116-
seq_oss_writeq_t *writeq;
108+
struct seq_oss_writeq *writeq;
117109

118110
/* midi input queue */
119-
seq_oss_readq_t *readq;
111+
struct seq_oss_readq *readq;
120112

121113
/* timer */
122-
seq_oss_timer_t *timer;
114+
struct seq_oss_timer *timer;
123115
};
124116

125117

@@ -133,24 +125,24 @@ int snd_seq_oss_delete_client(void);
133125

134126
/* device file interface */
135127
int snd_seq_oss_open(struct file *file, int level);
136-
void snd_seq_oss_release(seq_oss_devinfo_t *dp);
137-
int snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long arg);
138-
int snd_seq_oss_read(seq_oss_devinfo_t *dev, char __user *buf, int count);
139-
int snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt);
140-
unsigned int snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait);
128+
void snd_seq_oss_release(struct seq_oss_devinfo *dp);
129+
int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg);
130+
int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count);
131+
int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt);
132+
unsigned int snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait);
141133

142-
void snd_seq_oss_reset(seq_oss_devinfo_t *dp);
143-
void snd_seq_oss_drain_write(seq_oss_devinfo_t *dp);
134+
void snd_seq_oss_reset(struct seq_oss_devinfo *dp);
135+
void snd_seq_oss_drain_write(struct seq_oss_devinfo *dp);
144136

145137
/* */
146-
void snd_seq_oss_process_queue(seq_oss_devinfo_t *dp, abstime_t time);
138+
void snd_seq_oss_process_queue(struct seq_oss_devinfo *dp, abstime_t time);
147139

148140

149141
/* proc interface */
150-
void snd_seq_oss_system_info_read(snd_info_buffer_t *buf);
151-
void snd_seq_oss_midi_info_read(snd_info_buffer_t *buf);
152-
void snd_seq_oss_synth_info_read(snd_info_buffer_t *buf);
153-
void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf);
142+
void snd_seq_oss_system_info_read(struct snd_info_buffer *buf);
143+
void snd_seq_oss_midi_info_read(struct snd_info_buffer *buf);
144+
void snd_seq_oss_synth_info_read(struct snd_info_buffer *buf);
145+
void snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf);
154146

155147
/* file mode macros */
156148
#define is_read_mode(mode) ((mode) & SNDRV_SEQ_OSS_FILE_READ)
@@ -159,21 +151,21 @@ void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf);
159151

160152
/* dispatch event */
161153
static inline int
162-
snd_seq_oss_dispatch(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int atomic, int hop)
154+
snd_seq_oss_dispatch(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int atomic, int hop)
163155
{
164156
return snd_seq_kernel_client_dispatch(dp->cseq, ev, atomic, hop);
165157
}
166158

167159
/* ioctl */
168160
static inline int
169-
snd_seq_oss_control(seq_oss_devinfo_t *dp, unsigned int type, void *arg)
161+
snd_seq_oss_control(struct seq_oss_devinfo *dp, unsigned int type, void *arg)
170162
{
171163
return snd_seq_kernel_client_ctl(dp->cseq, type, arg);
172164
}
173165

174166
/* fill the addresses in header */
175167
static inline void
176-
snd_seq_oss_fill_addr(seq_oss_devinfo_t *dp, snd_seq_event_t *ev,
168+
snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
177169
int dest_client, int dest_port)
178170
{
179171
ev->queue = dp->queue;

0 commit comments

Comments
 (0)