diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h
index 562637b..59485be 100644
--- a/include/sound/asequencer.h
+++ b/include/sound/asequencer.h
@@ -35,13 +35,13 @@
  */
 
 /** system messages
- * event data type = #sndrv_seq_result_t
+ * event data type = #snd_seq_result
  */
 #define SNDRV_SEQ_EVENT_SYSTEM		0
 #define SNDRV_SEQ_EVENT_RESULT		1
 
 /** note messages (channel specific)
- * event data type = #sndrv_seq_ev_note
+ * event data type = #snd_seq_ev_note
  */
 #define SNDRV_SEQ_EVENT_NOTE		5
 #define SNDRV_SEQ_EVENT_NOTEON		6
@@ -49,7 +49,7 @@
 #define SNDRV_SEQ_EVENT_KEYPRESS	8
 	
 /** control messages (channel specific)
- * event data type = #sndrv_seq_ev_ctrl
+ * event data type = #snd_seq_ev_ctrl
  */
 #define SNDRV_SEQ_EVENT_CONTROLLER	10
 #define SNDRV_SEQ_EVENT_PGMCHANGE	11
@@ -60,7 +60,7 @@
 #define SNDRV_SEQ_EVENT_REGPARAM	16	/**< 14 bit RPN address + 14 bit unsigned value */
 
 /** synchronisation messages
- * event data type = #sndrv_seq_ev_ctrl
+ * event data type = #snd_seq_ev_ctrl
  */
 #define SNDRV_SEQ_EVENT_SONGPOS		20	/* Song Position Pointer with LSB and MSB values */
 #define SNDRV_SEQ_EVENT_SONGSEL		21	/* Song Select with song ID number */
@@ -69,7 +69,7 @@
 #define SNDRV_SEQ_EVENT_KEYSIGN		24	/* SMF Key Signature event */
 	        
 /** timer messages
- * event data type = sndrv_seq_ev_queue_control_t
+ * event data type = snd_seq_ev_queue_control
  */
 #define SNDRV_SEQ_EVENT_START		30	/* midi Real Time Start message */
 #define SNDRV_SEQ_EVENT_CONTINUE	31	/* midi Real Time Continue message */
@@ -95,7 +95,7 @@
 #define SNDRV_SEQ_EVENT_OSS		51	/* OSS raw event */
 
 /** system status messages (broadcast for subscribers)
- * event data type = sndrv_seq_addr_t
+ * event data type = snd_seq_addr
  */
 #define SNDRV_SEQ_EVENT_CLIENT_START	60	/* new client has connected */
 #define SNDRV_SEQ_EVENT_CLIENT_EXIT	61	/* client has left the system */
@@ -105,13 +105,13 @@
 #define SNDRV_SEQ_EVENT_PORT_CHANGE	65	/* port status/info has changed */
 
 /** port connection changes
- * event data type = sndrv_seq_connect_t
+ * event data type = snd_seq_connect
  */
 #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */
 #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */
 
 /** synthesizer events
- * event data type = sndrv_seq_eve_sample_control_t
+ * event data type = snd_seq_eve_sample_control
  */
 #define SNDRV_SEQ_EVENT_SAMPLE		70	/* sample select */
 #define SNDRV_SEQ_EVENT_SAMPLE_CLUSTER	71	/* sample cluster select */
@@ -162,7 +162,7 @@
 /* 119-129: reserved */
 
 /* 130-139: variable length events
- * event data type = sndrv_seq_ev_ext
+ * event data type = snd_seq_ev_ext
  * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set)
  */
 #define SNDRV_SEQ_EVENT_SYSEX		130	/* system exclusive data (variable length) */
@@ -186,18 +186,18 @@
 #define SNDRV_SEQ_EVENT_NONE		255
 
 
-typedef unsigned char sndrv_seq_event_type_t;
+typedef unsigned char snd_seq_event_type_t;
 
 /** event address */
-struct sndrv_seq_addr {
+struct snd_seq_addr {
 	unsigned char client;	/**< Client number:         0..255, 255 = broadcast to all clients */
 	unsigned char port;	/**< Port within client:    0..255, 255 = broadcast to all ports */
 };
 
 /** port connection */
-struct sndrv_seq_connect {
-	struct sndrv_seq_addr sender;
-	struct sndrv_seq_addr dest;
+struct snd_seq_connect {
+	struct snd_seq_addr sender;
+	struct snd_seq_addr dest;
 };
 
 
@@ -226,7 +226,7 @@
 
 
 	/* note event */
-struct sndrv_seq_ev_note {
+struct snd_seq_ev_note {
 	unsigned char channel;
 	unsigned char note;
 	unsigned char velocity;
@@ -235,7 +235,7 @@
 };
 
 	/* controller event */
-struct sndrv_seq_ev_ctrl {
+struct snd_seq_ev_ctrl {
 	unsigned char channel;
 	unsigned char unused1, unused2, unused3;	/* pad */
 	unsigned int param;
@@ -243,59 +243,59 @@
 };
 
 	/* generic set of bytes (12x8 bit) */
-struct sndrv_seq_ev_raw8 {
+struct snd_seq_ev_raw8 {
 	unsigned char d[12];	/* 8 bit value */
 };
 
 	/* generic set of integers (3x32 bit) */
-struct sndrv_seq_ev_raw32 {
+struct snd_seq_ev_raw32 {
 	unsigned int d[3];	/* 32 bit value */
 };
 
 	/* external stored data */
-struct sndrv_seq_ev_ext {
+struct snd_seq_ev_ext {
 	unsigned int len;	/* length of data */
 	void *ptr;		/* pointer to data (note: maybe 64-bit) */
 } __attribute__((packed));
 
 /* Instrument cluster type */
-typedef unsigned int sndrv_seq_instr_cluster_t;
+typedef unsigned int snd_seq_instr_cluster_t;
 
 /* Instrument type */
-struct sndrv_seq_instr {
-	sndrv_seq_instr_cluster_t cluster;
+struct snd_seq_instr {
+	snd_seq_instr_cluster_t cluster;
 	unsigned int std;		/* the upper byte means a private instrument (owner - client #) */
 	unsigned short bank;
 	unsigned short prg;
 };
 
 	/* sample number */
-struct sndrv_seq_ev_sample {
+struct snd_seq_ev_sample {
 	unsigned int std;
 	unsigned short bank;
 	unsigned short prg;
 };
 
 	/* sample cluster */
-struct sndrv_seq_ev_cluster {
-	sndrv_seq_instr_cluster_t cluster;
+struct snd_seq_ev_cluster {
+	snd_seq_instr_cluster_t cluster;
 };
 
 	/* sample position */
-typedef unsigned int sndrv_seq_position_t; /* playback position (in samples) * 16 */
+typedef unsigned int snd_seq_position_t; /* playback position (in samples) * 16 */
 
 	/* sample stop mode */
-enum sndrv_seq_stop_mode {
+enum {
 	SAMPLE_STOP_IMMEDIATELY = 0,	/* terminate playing immediately */
 	SAMPLE_STOP_VENVELOPE = 1,	/* finish volume envelope */
 	SAMPLE_STOP_LOOP = 2		/* terminate loop and finish wave */
 };
 
 	/* sample frequency */
-typedef int sndrv_seq_frequency_t; /* playback frequency in HZ * 16 */
+typedef int snd_seq_frequency_t; /* playback frequency in HZ * 16 */
 
 	/* sample volume control; if any value is set to -1 == do not change */
-struct sndrv_seq_ev_volume {
+struct snd_seq_ev_volume {
 	signed short volume;	/* range: 0-16383 */
 	signed short lr;	/* left-right balance; range: 0-16383 */
 	signed short fr;	/* front-rear balance; range: 0-16383 */
@@ -303,22 +303,22 @@
 };
 
 	/* simple loop redefinition */
-struct sndrv_seq_ev_loop {
+struct snd_seq_ev_loop {
 	unsigned int start;	/* loop start (in samples) * 16 */
 	unsigned int end;	/* loop end (in samples) * 16 */
 };
 
-struct sndrv_seq_ev_sample_control {
+struct snd_seq_ev_sample_control {
 	unsigned char channel;
 	unsigned char unused1, unused2, unused3;	/* pad */
 	union {
-		struct sndrv_seq_ev_sample sample;
-		struct sndrv_seq_ev_cluster cluster;
-		sndrv_seq_position_t position;
-		enum sndrv_seq_stop_mode stop_mode;
-		sndrv_seq_frequency_t frequency;
-		struct sndrv_seq_ev_volume volume;
-		struct sndrv_seq_ev_loop loop;
+		struct snd_seq_ev_sample sample;
+		struct snd_seq_ev_cluster cluster;
+		snd_seq_position_t position;
+		int stop_mode;
+		snd_seq_frequency_t frequency;
+		struct snd_seq_ev_volume volume;
+		struct snd_seq_ev_loop loop;
 		unsigned char raw8[8];
 	} param;
 };
@@ -326,82 +326,82 @@
 
 
 /* INSTR_BEGIN event */
-struct sndrv_seq_ev_instr_begin {
+struct snd_seq_ev_instr_begin {
 	int timeout;		/* zero = forever, otherwise timeout in ms */
 };
 
-struct sndrv_seq_result {
+struct snd_seq_result {
 	int event;		/* processed event type */
 	int result;
 };
 
 
-struct sndrv_seq_real_time {
+struct snd_seq_real_time {
 	unsigned int tv_sec;	/* seconds */
 	unsigned int tv_nsec;	/* nanoseconds */
 };
 
-typedef unsigned int sndrv_seq_tick_time_t;	/* midi ticks */
+typedef unsigned int snd_seq_tick_time_t;	/* midi ticks */
 
-union sndrv_seq_timestamp {
-	sndrv_seq_tick_time_t tick;
-	struct sndrv_seq_real_time time;
+union snd_seq_timestamp {
+	snd_seq_tick_time_t tick;
+	struct snd_seq_real_time time;
 };
 
-struct sndrv_seq_queue_skew {
+struct snd_seq_queue_skew {
 	unsigned int value;
 	unsigned int base;
 };
 
 	/* queue timer control */
-struct sndrv_seq_ev_queue_control {
+struct snd_seq_ev_queue_control {
 	unsigned char queue;			/* affected queue */
 	unsigned char pad[3];			/* reserved */
 	union {
 		signed int value;		/* affected value (e.g. tempo) */
-		union sndrv_seq_timestamp time;	/* time */
+		union snd_seq_timestamp time;	/* time */
 		unsigned int position;		/* sync position */
-		struct sndrv_seq_queue_skew skew;
+		struct snd_seq_queue_skew skew;
 		unsigned int d32[2];
 		unsigned char d8[8];
 	} param;
 };
 
 	/* quoted event - inside the kernel only */
-struct sndrv_seq_ev_quote {
-	struct sndrv_seq_addr origin;		/* original sender */
+struct snd_seq_ev_quote {
+	struct snd_seq_addr origin;		/* original sender */
 	unsigned short value;		/* optional data */
-	struct sndrv_seq_event *event;		/* quoted event */
+	struct snd_seq_event *event;		/* quoted event */
 } __attribute__((packed));
 
 
 	/* sequencer event */
-struct sndrv_seq_event {
-	sndrv_seq_event_type_t type;	/* event type */
+struct snd_seq_event {
+	snd_seq_event_type_t type;	/* event type */
 	unsigned char flags;		/* event flags */
 	char tag;
 	
 	unsigned char queue;		/* schedule queue */
-	union sndrv_seq_timestamp time;	/* schedule time */
+	union snd_seq_timestamp time;	/* schedule time */
 
 
-	struct sndrv_seq_addr source;	/* source address */
-	struct sndrv_seq_addr dest;	/* destination address */
+	struct snd_seq_addr source;	/* source address */
+	struct snd_seq_addr dest;	/* destination address */
 
 	union {				/* event data... */
-		struct sndrv_seq_ev_note note;
-		struct sndrv_seq_ev_ctrl control;
-		struct sndrv_seq_ev_raw8 raw8;
-		struct sndrv_seq_ev_raw32 raw32;
-		struct sndrv_seq_ev_ext ext;
-		struct sndrv_seq_ev_queue_control queue;
-		union sndrv_seq_timestamp time;
-		struct sndrv_seq_addr addr;
-		struct sndrv_seq_connect connect;
-		struct sndrv_seq_result result;
-		struct sndrv_seq_ev_instr_begin instr_begin;
-		struct sndrv_seq_ev_sample_control sample;
-		struct sndrv_seq_ev_quote quote;
+		struct snd_seq_ev_note note;
+		struct snd_seq_ev_ctrl control;
+		struct snd_seq_ev_raw8 raw8;
+		struct snd_seq_ev_raw32 raw32;
+		struct snd_seq_ev_ext ext;
+		struct snd_seq_ev_queue_control queue;
+		union snd_seq_timestamp time;
+		struct snd_seq_addr addr;
+		struct snd_seq_connect connect;
+		struct snd_seq_result result;
+		struct snd_seq_ev_instr_begin instr_begin;
+		struct snd_seq_ev_sample_control sample;
+		struct snd_seq_ev_quote quote;
 	} data;
 };
 
@@ -409,72 +409,77 @@
 /*
  * bounce event - stored as variable size data
  */
-struct sndrv_seq_event_bounce {
+struct snd_seq_event_bounce {
 	int err;
-	struct sndrv_seq_event event;
+	struct snd_seq_event event;
 	/* external data follows here. */
 };
 
-#define sndrv_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(sndrv_seq_event_bounce_t)))
+#ifdef __KERNEL__
+
+/* helper macro */
+#define snd_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(struct snd_seq_event_bounce)))
 
 /*
  * type check macros
  */
 /* result events: 0-4 */
-#define sndrv_seq_ev_is_result_type(ev)	((ev)->type < 5)
+#define snd_seq_ev_is_result_type(ev)	((ev)->type < 5)
 /* channel specific events: 5-19 */
-#define sndrv_seq_ev_is_channel_type(ev)	((ev)->type >= 5 && (ev)->type < 20)
+#define snd_seq_ev_is_channel_type(ev)	((ev)->type >= 5 && (ev)->type < 20)
 /* note events: 5-9 */
-#define sndrv_seq_ev_is_note_type(ev)	((ev)->type >= 5 && (ev)->type < 10)
+#define snd_seq_ev_is_note_type(ev)	((ev)->type >= 5 && (ev)->type < 10)
 /* control events: 10-19 */
-#define sndrv_seq_ev_is_control_type(ev)	((ev)->type >= 10 && (ev)->type < 20)
+#define snd_seq_ev_is_control_type(ev)	((ev)->type >= 10 && (ev)->type < 20)
 /* queue control events: 30-39 */
-#define sndrv_seq_ev_is_queue_type(ev)	((ev)->type >= 30 && (ev)->type < 40)
+#define snd_seq_ev_is_queue_type(ev)	((ev)->type >= 30 && (ev)->type < 40)
 /* system status messages */
-#define sndrv_seq_ev_is_message_type(ev)	((ev)->type >= 60 && (ev)->type < 69)
+#define snd_seq_ev_is_message_type(ev)	((ev)->type >= 60 && (ev)->type < 69)
 /* sample messages */
-#define sndrv_seq_ev_is_sample_type(ev)	((ev)->type >= 70 && (ev)->type < 79)
+#define snd_seq_ev_is_sample_type(ev)	((ev)->type >= 70 && (ev)->type < 79)
 /* user-defined messages */
-#define sndrv_seq_ev_is_user_type(ev)	((ev)->type >= 90 && (ev)->type < 99)
+#define snd_seq_ev_is_user_type(ev)	((ev)->type >= 90 && (ev)->type < 99)
 /* fixed length events: 0-99 */
-#define sndrv_seq_ev_is_fixed_type(ev)	((ev)->type < 100)
+#define snd_seq_ev_is_fixed_type(ev)	((ev)->type < 100)
 /* instrument layer events: 100-129 */
-#define sndrv_seq_ev_is_instr_type(ev)	((ev)->type >= 100 && (ev)->type < 130)
+#define snd_seq_ev_is_instr_type(ev)	((ev)->type >= 100 && (ev)->type < 130)
 /* variable length events: 130-139 */
-#define sndrv_seq_ev_is_variable_type(ev)	((ev)->type >= 130 && (ev)->type < 140)
+#define snd_seq_ev_is_variable_type(ev)	((ev)->type >= 130 && (ev)->type < 140)
 /* reserved for kernel */
-#define sndrv_seq_ev_is_reserved(ev)	((ev)->type >= 150)
+#define snd_seq_ev_is_reserved(ev)	((ev)->type >= 150)
 
 /* direct dispatched events */
-#define sndrv_seq_ev_is_direct(ev)	((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT)
+#define snd_seq_ev_is_direct(ev)	((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT)
 
 /*
  * macros to check event flags
  */
 /* prior events */
-#define sndrv_seq_ev_is_prior(ev)		(((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH)
+#define snd_seq_ev_is_prior(ev)		(((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH)
 
 /* event length type */
-#define sndrv_seq_ev_length_type(ev)	((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK)
-#define sndrv_seq_ev_is_fixed(ev)		(sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED)
-#define sndrv_seq_ev_is_variable(ev)	(sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
-#define sndrv_seq_ev_is_varusr(ev)	(sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR)
+#define snd_seq_ev_length_type(ev)	((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK)
+#define snd_seq_ev_is_fixed(ev)		(snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED)
+#define snd_seq_ev_is_variable(ev)	(snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
+#define snd_seq_ev_is_varusr(ev)	(snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR)
 
 /* time-stamp type */
-#define sndrv_seq_ev_timestamp_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK)
-#define sndrv_seq_ev_is_tick(ev)		(sndrv_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK)
-#define sndrv_seq_ev_is_real(ev)		(sndrv_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL)
+#define snd_seq_ev_timestamp_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK)
+#define snd_seq_ev_is_tick(ev)		(snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK)
+#define snd_seq_ev_is_real(ev)		(snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL)
 
 /* time-mode type */
-#define sndrv_seq_ev_timemode_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK)
-#define sndrv_seq_ev_is_abstime(ev)	(sndrv_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS)
-#define sndrv_seq_ev_is_reltime(ev)	(sndrv_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL)
+#define snd_seq_ev_timemode_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK)
+#define snd_seq_ev_is_abstime(ev)	(snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS)
+#define snd_seq_ev_is_reltime(ev)	(snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL)
 
 /* queue sync port */
-#define sndrv_seq_queue_sync_port(q)	((q) + 16)
+#define snd_seq_queue_sync_port(q)	((q) + 16)
+
+#endif /* __KERNEL__ */
 
 	/* system information */
-struct sndrv_seq_system_info {
+struct snd_seq_system_info {
 	int queues;			/* maximum queues count */
 	int clients;			/* maximum clients count */
 	int ports;			/* maximum ports per client */
@@ -486,7 +491,7 @@
 
 
 	/* system running information */
-struct sndrv_seq_running_info {
+struct snd_seq_running_info {
 	unsigned char client;		/* client id */
 	unsigned char big_endian;	/* 1 = big-endian */
 	unsigned char cpu_mode;		/* 4 = 32bit, 8 = 64bit */
@@ -502,11 +507,10 @@
 
 
 	/* client types */
-enum sndrv_seq_client_type {
-	NO_CLIENT       = 0,
-	USER_CLIENT     = 1,
-	KERNEL_CLIENT   = 2
-};
+typedef int __bitwise snd_seq_client_type_t;
+#define	NO_CLIENT	((__force snd_seq_client_type_t) 0)
+#define	USER_CLIENT	((__force snd_seq_client_type_t) 1)
+#define	KERNEL_CLIENT	((__force snd_seq_client_type_t) 2)
                         
 	/* event filter flags */
 #define SNDRV_SEQ_FILTER_BROADCAST	(1<<0)	/* accept broadcast messages */
@@ -514,9 +518,9 @@
 #define SNDRV_SEQ_FILTER_BOUNCE		(1<<2)	/* accept bounce event in error */
 #define SNDRV_SEQ_FILTER_USE_EVENT	(1<<31)	/* use event filter */
 
-struct sndrv_seq_client_info {
+struct snd_seq_client_info {
 	int client;			/* client number to inquire */
-	enum sndrv_seq_client_type type;	/* client type */
+	snd_seq_client_type_t type;	/* client type */
 	char name[64];			/* client name */
 	unsigned int filter;		/* filter flags */
 	unsigned char multicast_filter[8]; /* multicast filter bitmap */
@@ -528,7 +532,7 @@
 
 
 /* client pool size */
-struct sndrv_seq_client_pool {
+struct snd_seq_client_pool {
 	int client;			/* client number to inquire */
 	int output_pool;		/* outgoing (write) pool size */
 	int input_pool;			/* incoming (read) pool size */
@@ -552,13 +556,13 @@
 #define SNDRV_SEQ_REMOVE_IGNORE_OFF 	(1<<8)	/* Do not flush off events */
 #define SNDRV_SEQ_REMOVE_TAG_MATCH 	(1<<9)	/* Restrict to events with given tag */
 
-struct sndrv_seq_remove_events {
+struct snd_seq_remove_events {
 	unsigned int  remove_mode;	/* Flags that determine what gets removed */
 
-	union sndrv_seq_timestamp time;
+	union snd_seq_timestamp time;
 
 	unsigned char queue;	/* Queue for REMOVE_DEST */
-	struct sndrv_seq_addr dest;	/* Address for REMOVE_DEST */
+	struct snd_seq_addr dest;	/* Address for REMOVE_DEST */
 	unsigned char channel;	/* Channel for REMOVE_DEST */
 
 	int  type;	/* For REMOVE_EVENT_TYPE */
@@ -607,8 +611,8 @@
 #define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1)
 #define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2)
 
-struct sndrv_seq_port_info {
-	struct sndrv_seq_addr addr;	/* client/port numbers */
+struct snd_seq_port_info {
+	struct snd_seq_addr addr;	/* client/port numbers */
 	char name[64];			/* port name */
 
 	unsigned int capability;	/* port capability bits */
@@ -631,7 +635,7 @@
 #define SNDRV_SEQ_QUEUE_FLG_SYNC	(1<<0)	/* sync enabled */
 
 /* queue information */
-struct sndrv_seq_queue_info {
+struct snd_seq_queue_info {
 	int queue;		/* queue id */
 
 	/*
@@ -647,11 +651,11 @@
 };
 
 /* queue info/status */
-struct sndrv_seq_queue_status {
+struct snd_seq_queue_status {
 	int queue;			/* queue id */
 	int events;			/* read-only - queue size */
-	sndrv_seq_tick_time_t tick;	/* current tick */
-	struct sndrv_seq_real_time time; /* current time */
+	snd_seq_tick_time_t tick;	/* current tick */
+	struct snd_seq_real_time time;	/* current time */
 	int running;			/* running state of queue */
 	int flags;			/* various flags */
 	char reserved[64];		/* for the future */
@@ -659,7 +663,7 @@
 
 
 /* queue tempo */
-struct sndrv_seq_queue_tempo {
+struct snd_seq_queue_tempo {
 	int queue;			/* sequencer queue */
 	unsigned int tempo;		/* current tempo, us/tick */
 	int ppq;			/* time resolution, ticks/quarter */
@@ -675,12 +679,12 @@
 #define SNDRV_SEQ_TIMER_MIDI_TICK	2	/* Midi Timer Tick (TICK event) */
 
 /* queue timer info */
-struct sndrv_seq_queue_timer {
+struct snd_seq_queue_timer {
 	int queue;			/* sequencer queue */
 	int type;			/* source timer type */
 	union {
 		struct {
-			struct sndrv_timer_id id;	/* ALSA's timer ID */
+			struct snd_timer_id id;	/* ALSA's timer ID */
 			unsigned int resolution;	/* resolution in Hz */
 		} alsa;
 	} u;
@@ -688,7 +692,7 @@
 };
 
 
-struct sndrv_seq_queue_client {
+struct snd_seq_queue_client {
 	int queue;		/* sequencer queue */
 	int client;		/* sequencer client */
 	int used;		/* queue is used with this client
@@ -702,9 +706,9 @@
 #define SNDRV_SEQ_PORT_SUBS_TIMESTAMP	(1<<1)
 #define SNDRV_SEQ_PORT_SUBS_TIME_REAL	(1<<2)
 
-struct sndrv_seq_port_subscribe {
-	struct sndrv_seq_addr sender;	/* sender address */
-	struct sndrv_seq_addr dest;	/* destination address */
+struct snd_seq_port_subscribe {
+	struct snd_seq_addr sender;	/* sender address */
+	struct snd_seq_addr dest;	/* destination address */
 	unsigned int voices;		/* number of voices to be allocated (0 = don't care) */
 	unsigned int flags;		/* modes */
 	unsigned char queue;		/* input time-stamp queue (optional) */
@@ -716,12 +720,12 @@
 #define SNDRV_SEQ_QUERY_SUBS_READ	0
 #define SNDRV_SEQ_QUERY_SUBS_WRITE	1
 
-struct sndrv_seq_query_subs {
-	struct sndrv_seq_addr root;	/* client/port id to be searched */
+struct snd_seq_query_subs {
+	struct snd_seq_addr root;	/* client/port id to be searched */
 	int type;		/* READ or WRITE */
 	int index;		/* 0..N-1 */
 	int num_subs;		/* R/O: number of subscriptions on this port */
-	struct sndrv_seq_addr addr;	/* R/O: result */
+	struct snd_seq_addr addr;	/* R/O: result */
 	unsigned char queue;	/* R/O: result */
 	unsigned int flags;	/* R/O: result */
 	char reserved[64];	/* for future use */
@@ -778,72 +782,72 @@
 #define SNDRV_SEQ_INSTR_FREE_CMD_SINGLE		3
 
 /* size of ROM/RAM */
-typedef unsigned int sndrv_seq_instr_size_t;
+typedef unsigned int snd_seq_instr_size_t;
 
 /* INSTR_INFO */
 
-struct sndrv_seq_instr_info {
+struct snd_seq_instr_info {
 	int result;			/* operation result */
 	unsigned int formats[8];	/* bitmap of supported formats */
 	int ram_count;			/* count of RAM banks */
-	sndrv_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */
+	snd_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */
 	int rom_count;			/* count of ROM banks */
-	sndrv_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */
+	snd_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */
 	char reserved[128];
 };
 
 /* INSTR_STATUS */
 
-struct sndrv_seq_instr_status {
+struct snd_seq_instr_status {
 	int result;			/* operation result */
-	sndrv_seq_instr_size_t free_ram[16]; /* free RAM in banks */
+	snd_seq_instr_size_t free_ram[16]; /* free RAM in banks */
 	int instrument_count;		/* count of downloaded instruments */
 	char reserved[128];
 };
 
 /* INSTR_FORMAT_INFO */
 
-struct sndrv_seq_instr_format_info {
+struct snd_seq_instr_format_info {
 	char format[16];		/* format identifier - SNDRV_SEQ_INSTR_ID_* */	
 	unsigned int len;		/* max data length (without this structure) */
 };
 
-struct sndrv_seq_instr_format_info_result {
+struct snd_seq_instr_format_info_result {
 	int result;			/* operation result */
 	char format[16];		/* format identifier */
 	unsigned int len;		/* filled data length (without this structure) */
 };
 
 /* instrument data */
-struct sndrv_seq_instr_data {
+struct snd_seq_instr_data {
 	char name[32];			/* instrument name */
 	char reserved[16];		/* for the future use */
 	int type;			/* instrument type */
 	union {
 		char format[16];	/* format identifier */
-		struct sndrv_seq_instr alias;
+		struct snd_seq_instr alias;
 	} data;
 };
 
 /* INSTR_PUT/GET, data are stored in one block (extended), header + data */
 
-struct sndrv_seq_instr_header {
+struct snd_seq_instr_header {
 	union {
-		struct sndrv_seq_instr instr;
-		sndrv_seq_instr_cluster_t cluster;
+		struct snd_seq_instr instr;
+		snd_seq_instr_cluster_t cluster;
 	} id;				/* instrument identifier */
 	unsigned int cmd;		/* get/put/free command */
 	unsigned int flags;		/* query flags (only for get) */
 	unsigned int len;		/* real instrument data length (without header) */
 	int result;			/* operation result */
 	char reserved[16];		/* for the future */
-	struct sndrv_seq_instr_data data; /* instrument data (for put/get result) */
+	struct snd_seq_instr_data data; /* instrument data (for put/get result) */
 };
 
 /* INSTR_CLUSTER_SET */
 
-struct sndrv_seq_instr_cluster_set {
-	sndrv_seq_instr_cluster_t cluster; /* cluster identifier */
+struct snd_seq_instr_cluster_set {
+	snd_seq_instr_cluster_t cluster; /* cluster identifier */
 	char name[32];			/* cluster name */
 	int priority;			/* cluster priority */
 	char reserved[64];		/* for the future use */
@@ -851,8 +855,8 @@
 
 /* INSTR_CLUSTER_GET */
 
-struct sndrv_seq_instr_cluster_get {
-	sndrv_seq_instr_cluster_t cluster; /* cluster identifier */
+struct snd_seq_instr_cluster_get {
+	snd_seq_instr_cluster_t cluster; /* cluster identifier */
 	char name[32];			/* cluster name */
 	int priority;			/* cluster priority */
 	char reserved[64];		/* for the future use */
@@ -864,44 +868,44 @@
 
 #define SNDRV_SEQ_IOCTL_PVERSION	_IOR ('S', 0x00, int)
 #define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
-#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct sndrv_seq_system_info)
-#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct sndrv_seq_running_info)
+#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
+#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
 
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct sndrv_seq_client_info)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct sndrv_seq_client_info)
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
 
-#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct sndrv_seq_port_info)
-#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct sndrv_seq_port_info)
-#define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct sndrv_seq_port_info)
-#define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct sndrv_seq_port_info)
+#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct snd_seq_port_info)
 
-#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct sndrv_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct sndrv_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct snd_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
 
-#define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct sndrv_seq_queue_status)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct sndrv_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct sndrv_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER	_IOWR('S', 0x43, struct sndrv_seq_queue_owner)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER	_IOW ('S', 0x44, struct sndrv_seq_queue_owner)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct sndrv_seq_queue_timer)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct sndrv_seq_queue_timer)
+#define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct snd_seq_queue_tempo)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct snd_seq_queue_tempo)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER	_IOWR('S', 0x43, struct snd_seq_queue_owner)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER	_IOW ('S', 0x44, struct snd_seq_queue_owner)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct snd_seq_queue_timer)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct snd_seq_queue_timer)
 /* XXX
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC	_IOWR('S', 0x53, struct sndrv_seq_queue_sync)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC	_IOW ('S', 0x54, struct sndrv_seq_queue_sync)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC	_IOWR('S', 0x53, struct snd_seq_queue_sync)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC	_IOW ('S', 0x54, struct snd_seq_queue_sync)
 */
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct sndrv_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct sndrv_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct sndrv_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct sndrv_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct sndrv_seq_remove_events)
-#define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct sndrv_seq_query_subs)
-#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct sndrv_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct sndrv_seq_client_info)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct sndrv_seq_port_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct snd_seq_queue_client)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct snd_seq_queue_client)
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct snd_seq_client_pool)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct snd_seq_client_pool)
+#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct snd_seq_remove_events)
+#define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct snd_seq_query_subs)
+#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct snd_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct snd_seq_port_info)
 
 #endif /* __SOUND_ASEQUENCER_H */
diff --git a/include/sound/seq_device.h b/include/sound/seq_device.h
index 204ca54..2b5f24c 100644
--- a/include/sound/seq_device.h
+++ b/include/sound/seq_device.h
@@ -21,9 +21,6 @@
  *
  */
 
-typedef struct snd_seq_device snd_seq_device_t;
-typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
-
 /*
  * registered device information
  */
@@ -36,7 +33,7 @@
 
 struct snd_seq_device {
 	/* device info */
-	snd_card_t *card;	/* sound card */
+	struct snd_card *card;	/* sound card */
 	int device;		/* device number */
 	char id[ID_LEN];	/* driver id */
 	char name[80];		/* device name */
@@ -44,7 +41,7 @@
 	void *driver_data;	/* private data for driver */
 	int status;		/* flag - read only */
 	void *private_data;	/* private data for the caller */
-	void (*private_free)(snd_seq_device_t *device);
+	void (*private_free)(struct snd_seq_device *device);
 	struct list_head list;	/* link to next device */
 };
 
@@ -63,19 +60,19 @@
  *	Typically, call snd_device_free(dev->card, dev->driver_data)
  */
 struct snd_seq_dev_ops {
-	int (*init_device)(snd_seq_device_t *dev);
-	int (*free_device)(snd_seq_device_t *dev);
+	int (*init_device)(struct snd_seq_device *dev);
+	int (*free_device)(struct snd_seq_device *dev);
 };
 
 /*
  * prototypes
  */
 void snd_seq_device_load_drivers(void);
-int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize, snd_seq_device_t **result);
-int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsize);
+int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize, struct snd_seq_device **result);
+int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, int argsize);
 int snd_seq_device_unregister_driver(char *id);
 
-#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(snd_seq_device_t))
+#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device))
 
 
 /*
@@ -84,5 +81,4 @@
 #define SNDRV_SEQ_DEV_ID_MIDISYNTH	"seq-midi"
 #define SNDRV_SEQ_DEV_ID_OPL3		"opl3-synth"
 
-
 #endif /* __SOUND_SEQ_DEVICE_H */
diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h
index 1a654df..db764f0 100644
--- a/include/sound/seq_instr.h
+++ b/include/sound/seq_instr.h
@@ -24,29 +24,27 @@
 #include "seq_kernel.h"
 
 /* Instrument cluster */
-typedef struct _snd_seq_kcluster {
+struct snd_seq_kcluster {
 	snd_seq_instr_cluster_t cluster;
 	char name[32];
 	int priority;
-	struct _snd_seq_kcluster *next;
-} snd_seq_kcluster_t;
+	struct snd_seq_kcluster *next;
+};
 
 /* return pointer to private data */
-#define KINSTR_DATA(kinstr)	(void *)(((char *)kinstr) + sizeof(snd_seq_kinstr_t))
-
-typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t;
+#define KINSTR_DATA(kinstr)	(void *)(((char *)kinstr) + sizeof(struct snd_seq_kinstr))
 
 /* Instrument structure */
-typedef struct _snd_seq_kinstr {
-	snd_seq_instr_t instr;
+struct snd_seq_kinstr {
+	struct snd_seq_instr instr;
 	char name[32];
 	int type;			/* instrument type */
 	int use;			/* use count */
 	int busy;			/* not useable */
 	int add_len;			/* additional length */
-	snd_seq_kinstr_ops_t *ops;	/* operations */
-	struct _snd_seq_kinstr *next;
-} snd_seq_kinstr_t;
+	struct snd_seq_kinstr_ops *ops;	/* operations */
+	struct snd_seq_kinstr *next;
+};
 
 #define SNDRV_SEQ_INSTR_HASH_SIZE		32
 
@@ -54,11 +52,11 @@
 #define SNDRV_SEQ_INSTR_FLG_DIRECT	(1<<0)	/* accept only direct events */
 
 /* List of all instruments */
-typedef struct {
-	snd_seq_kinstr_t *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
+struct snd_seq_kinstr_list {
+	struct snd_seq_kinstr *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
 	int count;			/* count of all instruments */
 	
-	snd_seq_kcluster_t *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
+	struct snd_seq_kcluster *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
 	int ccount;			/* count of all clusters */
 
 	int owner;			/* current owner of the instrument list */
@@ -68,7 +66,7 @@
 	spinlock_t ops_lock;
 	struct semaphore ops_mutex;
 	unsigned long ops_flags;
-} snd_seq_kinstr_list_t;
+};
 
 #define SNDRV_SEQ_INSTR_NOTIFY_REMOVE	0
 #define SNDRV_SEQ_INSTR_NOTIFY_CHANGE	1
@@ -78,33 +76,33 @@
 	long add_len;			/* additional length */
 	char *instr_type;
 	int (*info)(void *private_data, char *info_data, long len);
-	int (*put)(void *private_data, snd_seq_kinstr_t *kinstr,
+	int (*put)(void *private_data, struct snd_seq_kinstr *kinstr,
 		   char __user *instr_data, long len, int atomic, int cmd);
-	int (*get)(void *private_data, snd_seq_kinstr_t *kinstr,
+	int (*get)(void *private_data, struct snd_seq_kinstr *kinstr,
 		   char __user *instr_data, long len, int atomic, int cmd);
-	int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size);
-	int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic);
-	void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what);
+	int (*get_size)(void *private_data, struct snd_seq_kinstr *kinstr, long *size);
+	int (*remove)(void *private_data, struct snd_seq_kinstr *kinstr, int atomic);
+	void (*notify)(void *private_data, struct snd_seq_kinstr *kinstr, int what);
 	struct snd_seq_kinstr_ops *next;
 };
 
 
 /* instrument operations */
-snd_seq_kinstr_list_t *snd_seq_instr_list_new(void);
-void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list);
-int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list,
-				 snd_seq_instr_header_t *ifree,
+struct snd_seq_kinstr_list *snd_seq_instr_list_new(void);
+void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list);
+int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
+				 struct snd_seq_instr_header *ifree,
 				 int client,
 				 int atomic);
-snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
-				     snd_seq_instr_t *instr,
-				     int exact,
-				     int follow_alias);
-void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list,
-			    snd_seq_kinstr_t *instr);
-int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops,
-			snd_seq_kinstr_list_t *list,
-			snd_seq_event_t *ev,
+struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list,
+					  struct snd_seq_instr *instr,
+					  int exact,
+					  int follow_alias);
+void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list,
+			    struct snd_seq_kinstr *instr);
+int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops,
+			struct snd_seq_kinstr_list *list,
+			struct snd_seq_event *ev,
 			int client,
 			int atomic,
 			int hop);
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 4beca19..1b60890 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -24,62 +24,8 @@
 #include <linux/time.h>
 #include "asequencer.h"
 
-typedef sndrv_seq_tick_time_t snd_seq_tick_time_t;
-typedef sndrv_seq_position_t snd_seq_position_t;
-typedef sndrv_seq_frequency_t snd_seq_frequency_t;
-typedef sndrv_seq_instr_cluster_t snd_seq_instr_cluster_t;
-typedef enum sndrv_seq_client_type snd_seq_client_type_t;
-typedef enum sndrv_seq_stop_mode snd_seq_stop_mode_t;
-typedef struct sndrv_seq_port_info snd_seq_port_info_t;
-typedef struct sndrv_seq_port_subscribe snd_seq_port_subscribe_t;
-typedef struct sndrv_seq_event snd_seq_event_t;
-typedef struct sndrv_seq_addr snd_seq_addr_t;
-typedef struct sndrv_seq_ev_volume snd_seq_ev_volume_t;
-typedef struct sndrv_seq_ev_loop snd_seq_ev_loop_t;
-typedef struct sndrv_seq_remove_events snd_seq_remove_events_t;
-typedef struct sndrv_seq_query_subs snd_seq_query_subs_t;
-typedef struct sndrv_seq_real_time snd_seq_real_time_t;
-typedef struct sndrv_seq_system_info snd_seq_system_info_t;
-typedef struct sndrv_seq_client_info snd_seq_client_info_t;
-typedef struct sndrv_seq_queue_info snd_seq_queue_info_t;
-typedef struct sndrv_seq_queue_status snd_seq_queue_status_t;
-typedef struct sndrv_seq_queue_tempo snd_seq_queue_tempo_t;
-typedef struct sndrv_seq_queue_owner snd_seq_queue_owner_t;
-typedef struct sndrv_seq_queue_timer snd_seq_queue_timer_t;
-typedef struct sndrv_seq_queue_client snd_seq_queue_client_t;
-typedef struct sndrv_seq_client_pool snd_seq_client_pool_t;
-typedef struct sndrv_seq_instr snd_seq_instr_t;
-typedef struct sndrv_seq_instr_data snd_seq_instr_data_t;
-typedef struct sndrv_seq_instr_header snd_seq_instr_header_t;
-typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
-
-#define snd_seq_event_bounce_ext_data	sndrv_seq_event_bounce_ext_data 
-#define snd_seq_ev_is_result_type	sndrv_seq_ev_is_result_type     
-#define snd_seq_ev_is_channel_type	sndrv_seq_ev_is_channel_type    
-#define snd_seq_ev_is_note_type		sndrv_seq_ev_is_note_type       
-#define snd_seq_ev_is_control_type	sndrv_seq_ev_is_control_type    
-#define snd_seq_ev_is_queue_type	sndrv_seq_ev_is_queue_type      
-#define snd_seq_ev_is_message_type	sndrv_seq_ev_is_message_type    
-#define snd_seq_ev_is_sample_type	sndrv_seq_ev_is_sample_type     
-#define snd_seq_ev_is_user_type		sndrv_seq_ev_is_user_type       
-#define snd_seq_ev_is_fixed_type	sndrv_seq_ev_is_fixed_type      
-#define snd_seq_ev_is_instr_type	sndrv_seq_ev_is_instr_type      
-#define snd_seq_ev_is_variable_type	sndrv_seq_ev_is_variable_type   
-#define snd_seq_ev_is_reserved		sndrv_seq_ev_is_reserved        
-#define snd_seq_ev_is_direct		sndrv_seq_ev_is_direct          
-#define snd_seq_ev_is_prior		sndrv_seq_ev_is_prior           
-#define snd_seq_ev_length_type		sndrv_seq_ev_length_type        
-#define snd_seq_ev_is_fixed		sndrv_seq_ev_is_fixed           
-#define snd_seq_ev_is_variable		sndrv_seq_ev_is_variable        
-#define snd_seq_ev_is_varusr		sndrv_seq_ev_is_varusr          
-#define snd_seq_ev_timestamp_type	sndrv_seq_ev_timestamp_type     
-#define snd_seq_ev_is_tick		sndrv_seq_ev_is_tick            
-#define snd_seq_ev_is_real		sndrv_seq_ev_is_real            
-#define snd_seq_ev_timemode_type	sndrv_seq_ev_timemode_type      
-#define snd_seq_ev_is_abstime		sndrv_seq_ev_is_abstime         
-#define snd_seq_ev_is_reltime		sndrv_seq_ev_is_reltime         
-#define snd_seq_queue_sync_port		sndrv_seq_queue_sync_port       
-#define snd_seq_queue_owner		sndrv_seq_queue_owner           
+typedef struct snd_seq_real_time snd_seq_real_time_t;
+typedef union snd_seq_timestamp snd_seq_timestamp_t;
 
 /* maximum number of events dequeued per schedule interval */
 #define SNDRV_SEQ_MAX_DEQUEUE		50
@@ -114,69 +60,56 @@
 /* max size of event size */
 #define SNDRV_SEQ_MAX_EVENT_LEN		0x3fffffff
 
-/* typedefs */
-struct _snd_seq_user_client;
-struct _snd_seq_kernel_client;
-struct _snd_seq_client;
-struct _snd_seq_queue;
-
-typedef struct _snd_seq_user_client user_client_t;
-typedef struct _snd_seq_kernel_client kernel_client_t;
-typedef struct _snd_seq_client client_t;
-typedef struct _snd_seq_queue queue_t;
-
 /* call-backs for kernel client */
 
-typedef struct {
+struct snd_seq_client_callback {
 	void *private_data;
 	unsigned allow_input: 1,
 		 allow_output: 1;
 	/*...*/
-} snd_seq_client_callback_t;
+};
 
 /* call-backs for kernel port */
-typedef int (snd_seq_kernel_port_open_t)(void *private_data, snd_seq_port_subscribe_t *info);
-typedef int (snd_seq_kernel_port_close_t)(void *private_data, snd_seq_port_subscribe_t *info);
-typedef int (snd_seq_kernel_port_input_t)(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop);
-typedef void (snd_seq_kernel_port_private_free_t)(void *private_data);
-
-typedef struct {
+struct snd_seq_port_callback {
 	struct module *owner;
 	void *private_data;
-	snd_seq_kernel_port_open_t *subscribe;
-	snd_seq_kernel_port_close_t *unsubscribe;
-	snd_seq_kernel_port_open_t *use;
-	snd_seq_kernel_port_close_t *unuse;
-	snd_seq_kernel_port_input_t *event_input;
-	snd_seq_kernel_port_private_free_t *private_free;
+	int (*subscribe)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*unsubscribe)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*use)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
+	void (*private_free)(void *private_data);
 	unsigned int callback_all;	/* call subscribe callbacks at each connection/disconnection */
 	/*...*/
-} snd_seq_port_callback_t;
+};
 
 /* interface for kernel client */
-extern int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_client_callback_t *callback);
-extern int snd_seq_delete_kernel_client(int client);
-extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+				 struct snd_seq_client_callback *callback);
+int snd_seq_delete_kernel_client(int client);
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
 
 #define SNDRV_SEQ_EXT_MASK	0xc0000000
 #define SNDRV_SEQ_EXT_USRPTR	0x80000000
 #define SNDRV_SEQ_EXT_CHAINED	0x40000000
 
 typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
-int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned);
-int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data);
+int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
+			     int in_kernel, int size_aligned);
+int snd_seq_dump_var_event(const struct snd_seq_event *event,
+			   snd_seq_dump_func_t func, void *private_data);
 
 /* interface for OSS emulation */
-int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo);
+int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo);
 
 /* port callback routines */
-void snd_port_init_callback(snd_seq_port_callback_t *p);
-snd_seq_port_callback_t *snd_port_alloc_callback(void);
+void snd_port_init_callback(struct snd_seq_port_callback *p);
+struct snd_seq_port_callback *snd_port_alloc_callback(void);
 
 /* port attach/detach */
-int snd_seq_event_port_attach(int client, snd_seq_port_callback_t *pcbp,
+int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
 			      int cap, int type, int midi_channels, int midi_voices, char *portname);
 int snd_seq_event_port_detach(int client, int port);
 
diff --git a/include/sound/seq_midi_emul.h b/include/sound/seq_midi_emul.h
index e58ca45..d6c4615 100644
--- a/include/sound/seq_midi_emul.h
+++ b/include/sound/seq_midi_emul.h
@@ -29,7 +29,7 @@
  * channel.  All drivers for hardware that does not understand midi
  * directly will probably need to use this structure.
  */
-typedef struct snd_midi_channel {
+struct snd_midi_channel {
 	void *private;		/* A back pointer to driver data */
 	int  number;		/* The channel number */
 	int  client;		/* The client associated with this channel */
@@ -53,41 +53,43 @@
 	short gm_rpn_fine_tuning; 	/* Master fine tuning */
 	short gm_rpn_coarse_tuning;	/* Master coarse tuning */
 
-} snd_midi_channel_t;
+};
 
 /*
  * A structure that represets a set of channels bound to a port.  There
  * would usually be 16 channels per port.  But fewer could be used for
  * particular cases.
  * The channel set consists of information describing the client and
- * port for this midi synth and an array of snd_midi_channel_t structures.
- * A driver that had no need for snd_midi_channel_t could still use the
+ * port for this midi synth and an array of snd_midi_channel structures.
+ * A driver that had no need for snd_midi_channel could still use the
  * channel set type if it wished with the channel array null.
  */
-typedef struct snd_midi_channel_set {
+struct snd_midi_channel_set {
 	void *private_data;		/* Driver data */
 	int  client;			/* Client for this port */
 	int  port;			/* The port number */
 
 	int  max_channels;		/* Size of the channels array */
-	snd_midi_channel_t *channels;
+	struct snd_midi_channel *channels;
 
 	unsigned char midi_mode;	/* MIDI operating mode */
 	unsigned char gs_master_volume;	/* SYSEX master volume: 0-127 */
 	unsigned char gs_chorus_mode;
 	unsigned char gs_reverb_mode;
 
-} snd_midi_channel_set_t;
+};
 
-typedef struct snd_seq_midi_op {
-	void (*note_on)(void *private_data, int note, int vel, snd_midi_channel_t *chan);
-	void (*note_off)(void *private_data,int note, int vel, snd_midi_channel_t *chan); /* release note */
-	void (*key_press)(void *private_data, int note, int vel, snd_midi_channel_t *chan);
-	void (*note_terminate)(void *private_data, int note, snd_midi_channel_t *chan); /* terminate note immediately */
-	void (*control)(void *private_data, int type, snd_midi_channel_t *chan);
-	void (*nrpn)(void *private_data, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-	void (*sysex)(void *private_data, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
-} snd_midi_op_t;
+struct snd_midi_op {
+	void (*note_on)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
+	void (*note_off)(void *private_data,int note, int vel, struct snd_midi_channel *chan); /* release note */
+	void (*key_press)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
+	void (*note_terminate)(void *private_data, int note, struct snd_midi_channel *chan); /* terminate note immediately */
+	void (*control)(void *private_data, int type, struct snd_midi_channel *chan);
+	void (*nrpn)(void *private_data, struct snd_midi_channel *chan,
+		     struct snd_midi_channel_set *chset);
+	void (*sysex)(void *private_data, unsigned char *buf, int len, int parsed,
+		      struct snd_midi_channel_set *chset);
+};
 
 /*
  * These defines are used so that pitchbend, aftertouch etc, can be
@@ -186,10 +188,10 @@
 };
 
 /* Prototypes for midi_process.c */
-void snd_midi_process_event(snd_midi_op_t *ops, snd_seq_event_t *ev,
-			    snd_midi_channel_set_t *chanset);
-void snd_midi_channel_set_clear(snd_midi_channel_set_t *chset);
-snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n);
-void snd_midi_channel_free_set(snd_midi_channel_set_t *chset);
+void snd_midi_process_event(struct snd_midi_op *ops, struct snd_seq_event *ev,
+			    struct snd_midi_channel_set *chanset);
+void snd_midi_channel_set_clear(struct snd_midi_channel_set *chset);
+struct snd_midi_channel_set *snd_midi_channel_alloc_set(int n);
+void snd_midi_channel_free_set(struct snd_midi_channel_set *chset);
 
 #endif /* __SOUND_SEQ_MIDI_EMUL_H */
diff --git a/include/sound/seq_midi_event.h b/include/sound/seq_midi_event.h
index 8857e2b..dd789e7 100644
--- a/include/sound/seq_midi_event.h
+++ b/include/sound/seq_midi_event.h
@@ -26,10 +26,8 @@
 
 #define MAX_MIDI_EVENT_BUF	256
 
-typedef struct snd_midi_event_t snd_midi_event_t;
-
 /* midi status */
-struct snd_midi_event_t {
+struct snd_midi_event {
 	int qlen;		/* queue length */
 	int read;		/* chars read */
 	int type;		/* current event type */
@@ -40,15 +38,17 @@
 	spinlock_t lock;
 };
 
-int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev);
-void snd_midi_event_free(snd_midi_event_t *dev);
-void snd_midi_event_reset_encode(snd_midi_event_t *dev);
-void snd_midi_event_reset_decode(snd_midi_event_t *dev);
-void snd_midi_event_no_status(snd_midi_event_t *dev, int on);
+int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev);
+void snd_midi_event_free(struct snd_midi_event *dev);
+void snd_midi_event_reset_encode(struct snd_midi_event *dev);
+void snd_midi_event_reset_decode(struct snd_midi_event *dev);
+void snd_midi_event_no_status(struct snd_midi_event *dev, int on);
 /* encode from byte stream - return number of written bytes if success */
-long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
-int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
+long snd_midi_event_encode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev);
+int snd_midi_event_encode_byte(struct snd_midi_event *dev, int c, struct snd_seq_event *ev);
 /* decode from event to bytes - return number of written bytes if success */
-long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
+long snd_midi_event_decode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev);
 
 #endif /* __SOUND_SEQ_MIDI_EVENT_H */
diff --git a/include/sound/seq_virmidi.h b/include/sound/seq_virmidi.h
index 1ad27e8..8d5aea7 100644
--- a/include/sound/seq_virmidi.h
+++ b/include/sound/seq_virmidi.h
@@ -25,25 +25,23 @@
 #include "rawmidi.h"
 #include "seq_midi_event.h"
 
-typedef struct _snd_virmidi_dev snd_virmidi_dev_t;
-
 /*
  * device file instance:
  * This instance is created at each time the midi device file is
  * opened.  Each instance has its own input buffer and MIDI parser
  * (buffer), and is associated with the device instance.
  */
-typedef struct _snd_virmidi {
+struct snd_virmidi {
 	struct list_head list;
 	int seq_mode;
 	int client;
 	int port;
 	unsigned int trigger: 1;
-	snd_midi_event_t *parser;
-	snd_seq_event_t event;
-	snd_virmidi_dev_t *rdev;
-	snd_rawmidi_substream_t *substream;
-} snd_virmidi_t;
+	struct snd_midi_event *parser;
+	struct snd_seq_event event;
+	struct snd_virmidi_dev *rdev;
+	struct snd_rawmidi_substream *substream;
+};
 
 #define SNDRV_VIRMIDI_SUBSCRIBE		(1<<0)
 #define SNDRV_VIRMIDI_USE		(1<<1)
@@ -53,9 +51,9 @@
  * Each virtual midi device has one device instance.  It contains
  * common information and the linked-list of opened files, 
  */
-struct _snd_virmidi_dev {
-	snd_card_t *card;		/* associated card */
-	snd_rawmidi_t *rmidi;		/* rawmidi device */
+struct snd_virmidi_dev {
+	struct snd_card *card;		/* associated card */
+	struct snd_rawmidi *rmidi;		/* rawmidi device */
 	int seq_mode;			/* SNDRV_VIRMIDI_XXX */
 	int device;			/* sequencer device */
 	int client;			/* created/attached client */
@@ -78,6 +76,6 @@
 #define SNDRV_VIRMIDI_SEQ_ATTACH	1
 #define SNDRV_VIRMIDI_SEQ_DISPATCH	2
 
-int snd_virmidi_new(snd_card_t *card, int device, snd_rawmidi_t **rrmidi);
+int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmidi);
 
 #endif /* __SOUND_SEQ_VIRMIDI */
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index a886db9..5eab420 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -58,14 +58,18 @@
  * client table
  */
 static char clienttablock[SNDRV_SEQ_MAX_CLIENTS];
-static client_t *clienttab[SNDRV_SEQ_MAX_CLIENTS];
-static usage_t client_usage;
+static struct snd_seq_client *clienttab[SNDRV_SEQ_MAX_CLIENTS];
+static struct snd_seq_usage client_usage;
 
 /*
  * prototypes
  */
-static int bounce_error_event(client_t *client, snd_seq_event_t *event, int err, int atomic, int hop);
-static int snd_seq_deliver_single_event(client_t *client, snd_seq_event_t *event, int filter, int atomic, int hop);
+static int bounce_error_event(struct snd_seq_client *client,
+			      struct snd_seq_event *event,
+			      int err, int atomic, int hop);
+static int snd_seq_deliver_single_event(struct snd_seq_client *client,
+					struct snd_seq_event *event,
+					int filter, int atomic, int hop);
 
 /*
  */
@@ -96,16 +100,17 @@
         }
 }
 
-static inline int snd_seq_write_pool_allocated(client_t *client)
+static inline int snd_seq_write_pool_allocated(struct snd_seq_client *client)
 {
 	return snd_seq_total_cells(client->pool) > 0;
 }
 
 /* return pointer to client structure for specified id */
-static client_t *clientptr(int clientid)
+static struct snd_seq_client *clientptr(int clientid)
 {
 	if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
-		snd_printd("Seq: oops. Trying to get pointer to client %d\n", clientid);
+		snd_printd("Seq: oops. Trying to get pointer to client %d\n",
+			   clientid);
 		return NULL;
 	}
 	return clienttab[clientid];
@@ -113,13 +118,14 @@
 
 extern int seq_client_load[];
 
-client_t *snd_seq_client_use_ptr(int clientid)
+struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
 {
 	unsigned long flags;
-	client_t *client;
+	struct snd_seq_client *client;
 
 	if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
-		snd_printd("Seq: oops. Trying to get pointer to client %d\n", clientid);
+		snd_printd("Seq: oops. Trying to get pointer to client %d\n",
+			   clientid);
 		return NULL;
 	}
 	spin_lock_irqsave(&clients_lock, flags);
@@ -144,7 +150,8 @@
 					if (seq_client_load[idx] < 0)
 						break;
 					if (seq_client_load[idx] == clientid) {
-						request_module("snd-seq-client-%i", clientid);
+						request_module("snd-seq-client-%i",
+							       clientid);
 						break;
 					}
 				}
@@ -174,14 +181,14 @@
 	return client;
 }
 
-static void usage_alloc(usage_t * res, int num)
+static void usage_alloc(struct snd_seq_usage *res, int num)
 {
 	res->cur += num;
 	if (res->cur > res->peak)
 		res->peak = res->cur;
 }
 
-static void usage_free(usage_t * res, int num)
+static void usage_free(struct snd_seq_usage *res, int num)
 {
 	res->cur -= num;
 }
@@ -196,11 +203,11 @@
 }
 
 
-static client_t *seq_create_client1(int client_index, int poolsize)
+static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
 {
 	unsigned long flags;
 	int c;
-	client_t *client;
+	struct snd_seq_client *client;
 
 	/* init client data */
 	client = kzalloc(sizeof(*client), GFP_KERNEL);
@@ -241,7 +248,7 @@
 }
 
 
-static int seq_free_client1(client_t *client)
+static int seq_free_client1(struct snd_seq_client *client)
 {
 	unsigned long flags;
 
@@ -263,12 +270,13 @@
 }
 
 
-static void seq_free_client(client_t * client)
+static void seq_free_client(struct snd_seq_client * client)
 {
 	down(&register_mutex);
 	switch (client->type) {
 	case NO_CLIENT:
-		snd_printk(KERN_WARNING "Seq: Trying to free unused client %d\n", client->number);
+		snd_printk(KERN_WARNING "Seq: Trying to free unused client %d\n",
+			   client->number);
 		break;
 	case USER_CLIENT:
 	case KERNEL_CLIENT:
@@ -277,7 +285,8 @@
 		break;
 
 	default:
-		snd_printk(KERN_ERR "Seq: Trying to free client %d with undefined type = %d\n", client->number, client->type);
+		snd_printk(KERN_ERR "Seq: Trying to free client %d with undefined type = %d\n",
+			   client->number, client->type);
 	}
 	up(&register_mutex);
 
@@ -292,8 +301,8 @@
 static int snd_seq_open(struct inode *inode, struct file *file)
 {
 	int c, mode;			/* client id */
-	client_t *client;
-	user_client_t *user;
+	struct snd_seq_client *client;
+	struct snd_seq_user_client *user;
 
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
@@ -344,7 +353,7 @@
 /* delete a user client */
 static int snd_seq_release(struct inode *inode, struct file *file)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 
 	if (client) {
 		seq_free_client(client);
@@ -364,13 +373,14 @@
  *	-EINVAL	no enough user-space buffer to write the whole event
  *	-EFAULT	seg. fault during copy to user space
  */
-static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count,
+			    loff_t *offset)
 {
-	client_t *client = (client_t *) file->private_data;
-	fifo_t *fifo;
+	struct snd_seq_client *client = file->private_data;
+	struct snd_seq_fifo *fifo;
 	int err;
 	long result = 0;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_INPUT))
 		return -ENXIO;
@@ -396,7 +406,7 @@
 	snd_seq_fifo_lock(fifo);
 
 	/* while data available in queue */
-	while (count >= sizeof(snd_seq_event_t)) {
+	while (count >= sizeof(struct snd_seq_event)) {
 		int nonblock;
 
 		nonblock = (file->f_flags & O_NONBLOCK) || result > 0;
@@ -404,34 +414,34 @@
 			break;
 		}
 		if (snd_seq_ev_is_variable(&cell->event)) {
-			snd_seq_event_t tmpev;
+			struct snd_seq_event tmpev;
 			tmpev = cell->event;
 			tmpev.data.ext.len &= ~SNDRV_SEQ_EXT_MASK;
-			if (copy_to_user(buf, &tmpev, sizeof(snd_seq_event_t))) {
+			if (copy_to_user(buf, &tmpev, sizeof(struct snd_seq_event))) {
 				err = -EFAULT;
 				break;
 			}
-			count -= sizeof(snd_seq_event_t);
-			buf += sizeof(snd_seq_event_t);
+			count -= sizeof(struct snd_seq_event);
+			buf += sizeof(struct snd_seq_event);
 			err = snd_seq_expand_var_event(&cell->event, count,
 						       (char __force *)buf, 0,
-						       sizeof(snd_seq_event_t));
+						       sizeof(struct snd_seq_event));
 			if (err < 0)
 				break;
 			result += err;
 			count -= err;
 			buf += err;
 		} else {
-			if (copy_to_user(buf, &cell->event, sizeof(snd_seq_event_t))) {
+			if (copy_to_user(buf, &cell->event, sizeof(struct snd_seq_event))) {
 				err = -EFAULT;
 				break;
 			}
-			count -= sizeof(snd_seq_event_t);
-			buf += sizeof(snd_seq_event_t);
+			count -= sizeof(struct snd_seq_event);
+			buf += sizeof(struct snd_seq_event);
 		}
 		snd_seq_cell_free(cell);
 		cell = NULL; /* to be sure */
-		result += sizeof(snd_seq_event_t);
+		result += sizeof(struct snd_seq_event);
 	}
 
 	if (err < 0) {
@@ -449,7 +459,7 @@
 /*
  * check access permission to the port
  */
-static int check_port_perm(client_port_t *port, unsigned int flags)
+static int check_port_perm(struct snd_seq_client_port *port, unsigned int flags)
 {
 	if ((port->capability & flags) != flags)
 		return 0;
@@ -460,9 +470,10 @@
  * check if the destination client is available, and return the pointer
  * if filter is non-zero, client filter bitmap is tested.
  */
-static client_t *get_event_dest_client(snd_seq_event_t *event, int filter)
+static struct snd_seq_client *get_event_dest_client(struct snd_seq_event *event,
+						    int filter)
 {
-	client_t *dest;
+	struct snd_seq_client *dest;
 
 	dest = snd_seq_client_use_ptr(event->dest.client);
 	if (dest == NULL)
@@ -493,10 +504,11 @@
  * quoted in SNDRV_SEQ_EVENT_KERNEL_ERROR, since this requires no extra
  * kmalloc.
  */
-static int bounce_error_event(client_t *client, snd_seq_event_t *event,
+static int bounce_error_event(struct snd_seq_client *client,
+			      struct snd_seq_event *event,
 			      int err, int atomic, int hop)
 {
-	snd_seq_event_t bounce_ev;
+	struct snd_seq_event bounce_ev;
 	int result;
 
 	if (client == NULL ||
@@ -531,9 +543,10 @@
  * of the given queue.
  * return non-zero if updated.
  */
-static int update_timestamp_of_queue(snd_seq_event_t *event, int queue, int real_time)
+static int update_timestamp_of_queue(struct snd_seq_event *event,
+				     int queue, int real_time)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	q = queueptr(queue);
 	if (! q)
@@ -559,12 +572,12 @@
  *  RETURN VALUE: 0 : if succeeded
  *		 <0 : error
  */
-static int snd_seq_deliver_single_event(client_t *client,
-					snd_seq_event_t *event,
+static int snd_seq_deliver_single_event(struct snd_seq_client *client,
+					struct snd_seq_event *event,
 					int filter, int atomic, int hop)
 {
-	client_t *dest = NULL;
-	client_port_t *dest_port = NULL;
+	struct snd_seq_client *dest = NULL;
+	struct snd_seq_client_port *dest_port = NULL;
 	int result = -ENOENT;
 	int direct;
 
@@ -596,7 +609,9 @@
 	case KERNEL_CLIENT:
 		if (dest_port->event_input == NULL)
 			break;
-		result = dest_port->event_input(event, direct, dest_port->private_data, atomic, hop);
+		result = dest_port->event_input(event, direct,
+						dest_port->private_data,
+						atomic, hop);
 		break;
 	default:
 		break;
@@ -618,16 +633,16 @@
 /*
  * send the event to all subscribers:
  */
-static int deliver_to_subscribers(client_t *client,
-				  snd_seq_event_t *event,
+static int deliver_to_subscribers(struct snd_seq_client *client,
+				  struct snd_seq_event *event,
 				  int atomic, int hop)
 {
-	subscribers_t *subs;
+	struct snd_seq_subscribers *subs;
 	int err = 0, num_ev = 0;
-	snd_seq_event_t event_saved;
-	client_port_t *src_port;
+	struct snd_seq_event event_saved;
+	struct snd_seq_client_port *src_port;
 	struct list_head *p;
-	port_subs_info_t *grp;
+	struct snd_seq_port_subs_info *grp;
 
 	src_port = snd_seq_port_use_ptr(client, event->source.port);
 	if (src_port == NULL)
@@ -642,7 +657,7 @@
 	else
 		down_read(&grp->list_mutex);
 	list_for_each(p, &grp->list_head) {
-		subs = list_entry(p, subscribers_t, src_list);
+		subs = list_entry(p, struct snd_seq_subscribers, src_list);
 		event->dest = subs->info.dest;
 		if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP)
 			/* convert time according to flag with subscription */
@@ -670,12 +685,12 @@
 /*
  * broadcast to all ports:
  */
-static int port_broadcast_event(client_t *client,
-				snd_seq_event_t *event,
+static int port_broadcast_event(struct snd_seq_client *client,
+				struct snd_seq_event *event,
 				int atomic, int hop)
 {
 	int num_ev = 0, err = 0;
-	client_t *dest_client;
+	struct snd_seq_client *dest_client;
 	struct list_head *p;
 
 	dest_client = get_event_dest_client(event, SNDRV_SEQ_FILTER_BROADCAST);
@@ -684,7 +699,7 @@
 
 	read_lock(&dest_client->ports_lock);
 	list_for_each(p, &dest_client->ports_list_head) {
-		client_port_t *port = list_entry(p, client_port_t, list);
+		struct snd_seq_client_port *port = list_entry(p, struct snd_seq_client_port, list);
 		event->dest.port = port->addr.port;
 		/* pass NULL as source client to avoid error bounce */
 		err = snd_seq_deliver_single_event(NULL, event,
@@ -704,12 +719,12 @@
  * send the event to all clients:
  * if destination port is also ADDRESS_BROADCAST, deliver to all ports.
  */
-static int broadcast_event(client_t *client,
-			   snd_seq_event_t *event, int atomic, int hop)
+static int broadcast_event(struct snd_seq_client *client,
+			   struct snd_seq_event *event, int atomic, int hop)
 {
 	int err = 0, num_ev = 0;
 	int dest;
-	snd_seq_addr_t addr;
+	struct snd_seq_addr addr;
 
 	addr = event->dest; /* save */
 
@@ -736,7 +751,7 @@
 
 
 /* multicast - not supported yet */
-static int multicast_event(client_t *client, snd_seq_event_t *event,
+static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event,
 			   int atomic, int hop)
 {
 	snd_printd("seq: multicast not supported yet.\n");
@@ -753,7 +768,7 @@
  *               n == 0 : the event was not passed to any client.
  *               n < 0  : error - event was not processed.
  */
-static int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
+static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_event *event,
 				 int atomic, int hop)
 {
 	int result;
@@ -794,9 +809,9 @@
  *		 n == 0 : the event was not passed to any client.
  *		 n < 0  : error - event was not processed.
  */
-int snd_seq_dispatch_event(snd_seq_event_cell_t *cell, int atomic, int hop)
+int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 	int result;
 
 	snd_assert(cell != NULL, return -EINVAL);
@@ -812,7 +827,7 @@
 		 * the event cell is re-used as a NOTE-OFF event and
 		 * enqueued again.
 		 */
-		snd_seq_event_t tmpev, *ev;
+		struct snd_seq_event tmpev, *ev;
 
 		/* reserve this event to enqueue note-off later */
 		tmpev = cell->event;
@@ -865,12 +880,12 @@
  * if pool is empty and blocking is TRUE, sleep until a new cell is
  * available.
  */
-static int snd_seq_client_enqueue_event(client_t *client,
-					snd_seq_event_t *event,
+static int snd_seq_client_enqueue_event(struct snd_seq_client *client,
+					struct snd_seq_event *event,
 					struct file *file, int blocking,
 					int atomic, int hop)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	int err;
 
 	/* special queue values - force direct passing */
@@ -886,7 +901,7 @@
 #endif
 	if (event->dest.client == SNDRV_SEQ_ADDRESS_SUBSCRIBERS) {
 		/* check presence of source port */
-		client_port_t *src_port = snd_seq_port_use_ptr(client, event->source.port);
+		struct snd_seq_client_port *src_port = snd_seq_port_use_ptr(client, event->source.port);
 		if (src_port == NULL)
 			return -EINVAL;
 		snd_seq_port_unlock(src_port);
@@ -924,7 +939,7 @@
  * check validity of event type and data length.
  * return non-zero if invalid.
  */
-static int check_event_type_and_length(snd_seq_event_t *ev)
+static int check_event_type_and_length(struct snd_seq_event *ev)
 {
 	switch (snd_seq_ev_length_type(ev)) {
 	case SNDRV_SEQ_EVENT_LENGTH_FIXED:
@@ -957,12 +972,13 @@
  *	-EMLINK	too many hops
  *	others	depends on return value from driver callback
  */
-static ssize_t snd_seq_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_seq_write(struct file *file, const char __user *buf,
+			     size_t count, loff_t *offset)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 	int written = 0, len;
 	int err = -EINVAL;
-	snd_seq_event_t event;
+	struct snd_seq_event event;
 
 	if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT))
 		return -ENXIO;
@@ -980,7 +996,7 @@
 	}
 
 	/* only process whole events */
-	while (count >= sizeof(snd_seq_event_t)) {
+	while (count >= sizeof(struct snd_seq_event)) {
 		/* Read in the event header from the user */
 		len = sizeof(event);
 		if (copy_from_user(&event, buf, len)) {
@@ -1012,7 +1028,7 @@
 			/* set user space pointer */
 			event.data.ext.len = extlen | SNDRV_SEQ_EXT_USRPTR;
 			event.data.ext.ptr = (char __force *)buf
-						+ sizeof(snd_seq_event_t);
+						+ sizeof(struct snd_seq_event);
 			len += extlen; /* increment data length */
 		} else {
 #ifdef CONFIG_COMPAT
@@ -1046,7 +1062,7 @@
  */
 static unsigned int snd_seq_poll(struct file *file, poll_table * wait)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 	unsigned int mask = 0;
 
 	/* check client structures are in place */
@@ -1076,9 +1092,9 @@
 
 
 /* SYSTEM_INFO ioctl() */
-static int snd_seq_ioctl_system_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_system_info(struct snd_seq_client *client, void __user *arg)
 {
-	snd_seq_system_info_t info;
+	struct snd_seq_system_info info;
 
 	memset(&info, 0, sizeof(info));
 	/* fill the info fields */
@@ -1096,10 +1112,10 @@
 
 
 /* RUNNING_MODE ioctl() */
-static int snd_seq_ioctl_running_mode(client_t *client, void __user *arg)
+static int snd_seq_ioctl_running_mode(struct snd_seq_client *client, void __user *arg)
 {
-	struct sndrv_seq_running_info info;
-	client_t *cptr;
+	struct snd_seq_running_info info;
+	struct snd_seq_client *cptr;
 	int err = 0;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -1133,7 +1149,8 @@
 }
 
 /* CLIENT_INFO ioctl() */
-static void get_client_info(client_t *cptr, snd_seq_client_info_t *info)
+static void get_client_info(struct snd_seq_client *cptr,
+			    struct snd_seq_client_info *info)
 {
 	info->client = cptr->number;
 
@@ -1147,10 +1164,11 @@
 	memset(info->reserved, 0, sizeof(info->reserved));
 }
 
-static int snd_seq_ioctl_get_client_info(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_client_info(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	client_t *cptr;
-	snd_seq_client_info_t client_info;
+	struct snd_seq_client *cptr;
+	struct snd_seq_client_info client_info;
 
 	if (copy_from_user(&client_info, arg, sizeof(client_info)))
 		return -EFAULT;
@@ -1170,9 +1188,10 @@
 
 
 /* CLIENT_INFO ioctl() */
-static int snd_seq_ioctl_set_client_info(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_client_info_t client_info;
+	struct snd_seq_client_info client_info;
 
 	if (copy_from_user(&client_info, arg, sizeof(client_info)))
 		return -EFAULT;
@@ -1199,11 +1218,12 @@
 /* 
  * CREATE PORT ioctl() 
  */
-static int snd_seq_ioctl_create_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_create_port(struct snd_seq_client *client,
+				     void __user *arg)
 {
-	client_port_t *port;
-	snd_seq_port_info_t info;
-	snd_seq_port_callback_t *callback;
+	struct snd_seq_client_port *port;
+	struct snd_seq_port_info info;
+	struct snd_seq_port_callback *callback;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1249,9 +1269,10 @@
 /* 
  * DELETE PORT ioctl() 
  */
-static int snd_seq_ioctl_delete_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_delete_port(struct snd_seq_client *client,
+				     void __user *arg)
 {
-	snd_seq_port_info_t info;
+	struct snd_seq_port_info info;
 	int err;
 
 	/* set passed parameters */
@@ -1272,11 +1293,12 @@
 /* 
  * GET_PORT_INFO ioctl() (on any client) 
  */
-static int snd_seq_ioctl_get_port_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_port_info(struct snd_seq_client *client,
+				       void __user *arg)
 {
-	client_t *cptr;
-	client_port_t *port;
-	snd_seq_port_info_t info;
+	struct snd_seq_client *cptr;
+	struct snd_seq_client_port *port;
+	struct snd_seq_port_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1304,10 +1326,11 @@
 /* 
  * SET_PORT_INFO ioctl() (only ports on this/own client) 
  */
-static int snd_seq_ioctl_set_port_info(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client,
+				       void __user *arg)
 {
-	client_port_t *port;
-	snd_seq_port_info_t info;
+	struct snd_seq_client_port *port;
+	struct snd_seq_port_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1329,9 +1352,10 @@
 #define PERM_RD		(SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ)
 #define PERM_WR		(SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_SUBS_WRITE)
 
-static int check_subscription_permission(client_t *client, client_port_t *sport,
-					 client_port_t *dport,
-					 snd_seq_port_subscribe_t *subs)
+static int check_subscription_permission(struct snd_seq_client *client,
+					 struct snd_seq_client_port *sport,
+					 struct snd_seq_client_port *dport,
+					 struct snd_seq_port_subscribe *subs)
 {
 	if (client->number != subs->sender.client &&
 	    client->number != subs->dest.client) {
@@ -1363,9 +1387,10 @@
  * client must be user client.
  */
 int snd_seq_client_notify_subscription(int client, int port,
-				       snd_seq_port_subscribe_t *info, int evtype)
+				       struct snd_seq_port_subscribe *info,
+				       int evtype)
 {
-	snd_seq_event_t event;
+	struct snd_seq_event event;
 
 	memset(&event, 0, sizeof(event));
 	event.type = evtype;
@@ -1379,12 +1404,13 @@
 /* 
  * add to port's subscription list IOCTL interface 
  */
-static int snd_seq_ioctl_subscribe_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_subscribe_port(struct snd_seq_client *client,
+					void __user *arg)
 {
 	int result = -EINVAL;
-	client_t *receiver = NULL, *sender = NULL;
-	client_port_t *sport = NULL, *dport = NULL;
-	snd_seq_port_subscribe_t subs;
+	struct snd_seq_client *receiver = NULL, *sender = NULL;
+	struct snd_seq_client_port *sport = NULL, *dport = NULL;
+	struct snd_seq_port_subscribe subs;
 
 	if (copy_from_user(&subs, arg, sizeof(subs)))
 		return -EFAULT;
@@ -1423,12 +1449,13 @@
 /* 
  * remove from port's subscription list 
  */
-static int snd_seq_ioctl_unsubscribe_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_unsubscribe_port(struct snd_seq_client *client,
+					  void __user *arg)
 {
 	int result = -ENXIO;
-	client_t *receiver = NULL, *sender = NULL;
-	client_port_t *sport = NULL, *dport = NULL;
-	snd_seq_port_subscribe_t subs;
+	struct snd_seq_client *receiver = NULL, *sender = NULL;
+	struct snd_seq_client_port *sport = NULL, *dport = NULL;
+	struct snd_seq_port_subscribe subs;
 
 	if (copy_from_user(&subs, arg, sizeof(subs)))
 		return -EFAULT;
@@ -1464,11 +1491,12 @@
 
 
 /* CREATE_QUEUE ioctl() */
-static int snd_seq_ioctl_create_queue(client_t *client, void __user *arg)
+static int snd_seq_ioctl_create_queue(struct snd_seq_client *client,
+				      void __user *arg)
 {
-	snd_seq_queue_info_t info;
+	struct snd_seq_queue_info info;
 	int result;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1498,9 +1526,10 @@
 }
 
 /* DELETE_QUEUE ioctl() */
-static int snd_seq_ioctl_delete_queue(client_t *client, void __user *arg)
+static int snd_seq_ioctl_delete_queue(struct snd_seq_client *client,
+				      void __user *arg)
 {
-	snd_seq_queue_info_t info;
+	struct snd_seq_queue_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1509,10 +1538,11 @@
 }
 
 /* GET_QUEUE_INFO ioctl() */
-static int snd_seq_ioctl_get_queue_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_queue_info(struct snd_seq_client *client,
+					void __user *arg)
 {
-	snd_seq_queue_info_t info;
-	queue_t *q;
+	struct snd_seq_queue_info info;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1535,10 +1565,11 @@
 }
 
 /* SET_QUEUE_INFO ioctl() */
-static int snd_seq_ioctl_set_queue_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_set_queue_info(struct snd_seq_client *client,
+					void __user *arg)
 {
-	snd_seq_queue_info_t info;
-	queue_t *q;
+	struct snd_seq_queue_info info;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1570,10 +1601,10 @@
 }
 
 /* GET_NAMED_QUEUE ioctl() */
-static int snd_seq_ioctl_get_named_queue(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_named_queue(struct snd_seq_client *client, void __user *arg)
 {
-	snd_seq_queue_info_t info;
-	queue_t *q;
+	struct snd_seq_queue_info info;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1593,11 +1624,12 @@
 }
 
 /* GET_QUEUE_STATUS ioctl() */
-static int snd_seq_ioctl_get_queue_status(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_status(struct snd_seq_client *client,
+					  void __user *arg)
 {
-	snd_seq_queue_status_t status;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue_status status;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	if (copy_from_user(&status, arg, sizeof(status)))
 		return -EFAULT;
@@ -1626,11 +1658,12 @@
 
 
 /* GET_QUEUE_TEMPO ioctl() */
-static int snd_seq_ioctl_get_queue_tempo(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_tempo(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_queue_tempo_t tempo;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue_tempo tempo;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	if (copy_from_user(&tempo, arg, sizeof(tempo)))
 		return -EFAULT;
@@ -1656,17 +1689,18 @@
 
 
 /* SET_QUEUE_TEMPO ioctl() */
-int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo)
+int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo)
 {
 	if (!snd_seq_queue_check_access(tempo->queue, client))
 		return -EPERM;
 	return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo);
 }
 
-static int snd_seq_ioctl_set_queue_tempo(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client,
+					 void __user *arg)
 {
 	int result;
-	snd_seq_queue_tempo_t tempo;
+	struct snd_seq_queue_tempo tempo;
 
 	if (copy_from_user(&tempo, arg, sizeof(tempo)))
 		return -EFAULT;
@@ -1677,11 +1711,12 @@
 
 
 /* GET_QUEUE_TIMER ioctl() */
-static int snd_seq_ioctl_get_queue_timer(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_timer(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_queue_timer_t timer;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue_timer timer;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	if (copy_from_user(&timer, arg, sizeof(timer)))
 		return -EFAULT;
@@ -1713,10 +1748,11 @@
 
 
 /* SET_QUEUE_TIMER ioctl() */
-static int snd_seq_ioctl_set_queue_timer(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_queue_timer(struct snd_seq_client *client,
+					 void __user *arg)
 {
 	int result = 0;
-	snd_seq_queue_timer_t timer;
+	struct snd_seq_queue_timer timer;
 
 	if (copy_from_user(&timer, arg, sizeof(timer)))
 		return -EFAULT;
@@ -1725,8 +1761,8 @@
 		return -EINVAL;
 
 	if (snd_seq_queue_check_access(timer.queue, client->number)) {
-		queue_t *q;
-		seq_timer_t *tmr;
+		struct snd_seq_queue *q;
+		struct snd_seq_timer *tmr;
 
 		q = queueptr(timer.queue);
 		if (q == NULL)
@@ -1754,9 +1790,10 @@
 
 
 /* GET_QUEUE_CLIENT ioctl() */
-static int snd_seq_ioctl_get_queue_client(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_client(struct snd_seq_client *client,
+					  void __user *arg)
 {
-	snd_seq_queue_client_t info;
+	struct snd_seq_queue_client info;
 	int used;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -1775,10 +1812,11 @@
 
 
 /* SET_QUEUE_CLIENT ioctl() */
-static int snd_seq_ioctl_set_queue_client(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_queue_client(struct snd_seq_client *client,
+					  void __user *arg)
 {
 	int err;
-	snd_seq_queue_client_t info;
+	struct snd_seq_queue_client info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1794,10 +1832,11 @@
 
 
 /* GET_CLIENT_POOL ioctl() */
-static int snd_seq_ioctl_get_client_pool(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_client_pool_t info;
-	client_t *cptr;
+	struct snd_seq_client_pool info;
+	struct snd_seq_client *cptr;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1828,9 +1867,10 @@
 }
 
 /* SET_CLIENT_POOL ioctl() */
-static int snd_seq_ioctl_set_client_pool(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_client_pool(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_client_pool_t info;
+	struct snd_seq_client_pool info;
 	int rc;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -1872,9 +1912,10 @@
 
 
 /* REMOVE_EVENTS ioctl() */
-static int snd_seq_ioctl_remove_events(client_t * client, void __user *arg)
+static int snd_seq_ioctl_remove_events(struct snd_seq_client *client,
+				       void __user *arg)
 {
-	snd_seq_remove_events_t info;
+	struct snd_seq_remove_events info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1901,13 +1942,14 @@
 /*
  * get subscription info
  */
-static int snd_seq_ioctl_get_subscription(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_subscription(struct snd_seq_client *client,
+					  void __user *arg)
 {
 	int result;
-	client_t *sender = NULL;
-	client_port_t *sport = NULL;
-	snd_seq_port_subscribe_t subs;
-	subscribers_t *p;
+	struct snd_seq_client *sender = NULL;
+	struct snd_seq_client_port *sport = NULL;
+	struct snd_seq_port_subscribe subs;
+	struct snd_seq_subscribers *p;
 
 	if (copy_from_user(&subs, arg, sizeof(subs)))
 		return -EFAULT;
@@ -1940,13 +1982,14 @@
 /*
  * get subscription info - check only its presence
  */
-static int snd_seq_ioctl_query_subs(client_t *client, void __user *arg)
+static int snd_seq_ioctl_query_subs(struct snd_seq_client *client,
+				    void __user *arg)
 {
 	int result = -ENXIO;
-	client_t *cptr = NULL;
-	client_port_t *port = NULL;
-	snd_seq_query_subs_t subs;
-	port_subs_info_t *group;
+	struct snd_seq_client *cptr = NULL;
+	struct snd_seq_client_port *port = NULL;
+	struct snd_seq_query_subs subs;
+	struct snd_seq_port_subs_info *group;
 	struct list_head *p;
 	int i;
 
@@ -1977,12 +2020,12 @@
 	list_for_each(p, &group->list_head) {
 		if (i++ == subs.index) {
 			/* found! */
-			subscribers_t *s;
+			struct snd_seq_subscribers *s;
 			if (subs.type == SNDRV_SEQ_QUERY_SUBS_READ) {
-				s = list_entry(p, subscribers_t, src_list);
+				s = list_entry(p, struct snd_seq_subscribers, src_list);
 				subs.addr = s->info.dest;
 			} else {
-				s = list_entry(p, subscribers_t, dest_list);
+				s = list_entry(p, struct snd_seq_subscribers, dest_list);
 				subs.addr = s->info.sender;
 			}
 			subs.flags = s->info.flags;
@@ -2009,10 +2052,11 @@
 /*
  * query next client
  */
-static int snd_seq_ioctl_query_next_client(client_t *client, void __user *arg)
+static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client,
+					   void __user *arg)
 {
-	client_t *cptr = NULL;
-	snd_seq_client_info_t info;
+	struct snd_seq_client *cptr = NULL;
+	struct snd_seq_client_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -2040,11 +2084,12 @@
 /* 
  * query next port
  */
-static int snd_seq_ioctl_query_next_port(client_t *client, void __user *arg)
+static int snd_seq_ioctl_query_next_port(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	client_t *cptr;
-	client_port_t *port = NULL;
-	snd_seq_port_info_t info;
+	struct snd_seq_client *cptr;
+	struct snd_seq_client_port *port = NULL;
+	struct snd_seq_port_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -2075,7 +2120,7 @@
 
 static struct seq_ioctl_table {
 	unsigned int cmd;
-	int (*func)(client_t *client, void __user * arg);
+	int (*func)(struct snd_seq_client *client, void __user * arg);
 } ioctl_tables[] = {
 	{ SNDRV_SEQ_IOCTL_SYSTEM_INFO, snd_seq_ioctl_system_info },
 	{ SNDRV_SEQ_IOCTL_RUNNING_MODE, snd_seq_ioctl_running_mode },
@@ -2109,7 +2154,8 @@
 	{ 0, NULL },
 };
 
-static int snd_seq_do_ioctl(client_t *client, unsigned int cmd, void __user *arg)
+static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
+			    void __user *arg)
 {
 	struct seq_ioctl_table *p;
 
@@ -2136,7 +2182,7 @@
 
 static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 
 	snd_assert(client != NULL, return -ENXIO);
 		
@@ -2153,9 +2199,10 @@
 
 
 /* exported to kernel modules */
-int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_client_callback_t * callback)
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+				 struct snd_seq_client_callback *callback)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
@@ -2199,7 +2246,7 @@
 /* exported to kernel modules */
 int snd_seq_delete_kernel_client(int client)
 {
-	client_t *ptr;
+	struct snd_seq_client *ptr;
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
@@ -2216,11 +2263,11 @@
 /* skeleton to enqueue event, called from snd_seq_kernel_client_enqueue
  * and snd_seq_kernel_client_enqueue_blocking
  */
-static int kernel_client_enqueue(int client, snd_seq_event_t *ev,
+static int kernel_client_enqueue(int client, struct snd_seq_event *ev,
 				 struct file *file, int blocking,
 				 int atomic, int hop)
 {
-	client_t *cptr;
+	struct snd_seq_client *cptr;
 	int result;
 
 	snd_assert(ev != NULL, return -EINVAL);
@@ -2254,7 +2301,7 @@
  *
  * RETURN VALUE: zero if succeed, negative if error
  */
-int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t * ev,
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev,
 				  int atomic, int hop)
 {
 	return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop);
@@ -2265,7 +2312,7 @@
  *
  * RETURN VALUE: zero if succeed, negative if error
  */
-int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev,
+int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
 					   struct file *file,
 					   int atomic, int hop)
 {
@@ -2280,10 +2327,10 @@
  * RETURN VALUE: negative = delivery failed,
  *		 zero, or positive: the number of delivered events
  */
-int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t * ev,
+int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event * ev,
 				   int atomic, int hop)
 {
-	client_t *cptr;
+	struct snd_seq_client *cptr;
 	int result;
 
 	snd_assert(ev != NULL, return -EINVAL);
@@ -2315,7 +2362,7 @@
  */
 int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 	mm_segment_t fs;
 	int result;
 
@@ -2332,7 +2379,7 @@
 /* exported (for OSS emulator) */
 int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 
 	client = clientptr(clientid);
 	if (client == NULL)
@@ -2350,10 +2397,12 @@
 /*
  *  /proc interface
  */
-static void snd_seq_info_dump_subscribers(snd_info_buffer_t *buffer, port_subs_info_t *group, int is_src, char *msg)
+static void snd_seq_info_dump_subscribers(struct snd_info_buffer *buffer,
+					  struct snd_seq_port_subs_info *group,
+					  int is_src, char *msg)
 {
 	struct list_head *p;
-	subscribers_t *s;
+	struct snd_seq_subscribers *s;
 	int count = 0;
 
 	down_read(&group->list_mutex);
@@ -2364,9 +2413,9 @@
 	snd_iprintf(buffer, msg);
 	list_for_each(p, &group->list_head) {
 		if (is_src)
-			s = list_entry(p, subscribers_t, src_list);
+			s = list_entry(p, struct snd_seq_subscribers, src_list);
 		else
-			s = list_entry(p, subscribers_t, dest_list);
+			s = list_entry(p, struct snd_seq_subscribers, dest_list);
 		if (count++)
 			snd_iprintf(buffer, ", ");
 		snd_iprintf(buffer, "%d:%d",
@@ -2387,13 +2436,14 @@
 
 #define FLAG_PERM_DUPLEX(perm) ((perm) & SNDRV_SEQ_PORT_CAP_DUPLEX ? 'X' : '-')
 
-static void snd_seq_info_dump_ports(snd_info_buffer_t *buffer, client_t *client)
+static void snd_seq_info_dump_ports(struct snd_info_buffer *buffer,
+				    struct snd_seq_client *client)
 {
 	struct list_head *l;
 
 	down(&client->ports_mutex);
 	list_for_each(l, &client->ports_list_head) {
-		client_port_t *p = list_entry(l, client_port_t, list);
+		struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
 		snd_iprintf(buffer, "  Port %3d : \"%s\" (%c%c%c%c)\n",
 			    p->addr.port, p->name,
 			    FLAG_PERM_RD(p->capability),
@@ -2407,13 +2457,15 @@
 }
 
 
+void snd_seq_info_pool(struct snd_info_buffer *buffer,
+		       struct snd_seq_pool *pool, char *space);
+
 /* exported to seq_info.c */
-void snd_seq_info_clients_read(snd_info_entry_t *entry, 
-			       snd_info_buffer_t * buffer)
+void snd_seq_info_clients_read(struct snd_info_entry *entry, 
+			       struct snd_info_buffer *buffer)
 {
-	extern void snd_seq_info_pool(snd_info_buffer_t * buffer, pool_t * pool, char *space);
 	int c;
-	client_t *client;
+	struct snd_seq_client *client;
 
 	snd_iprintf(buffer, "Client info\n");
 	snd_iprintf(buffer, "  cur  clients : %d\n", client_usage.cur);
@@ -2468,7 +2520,7 @@
 	.compat_ioctl =	snd_seq_ioctl_compat,
 };
 
-static snd_minor_t snd_seq_reg =
+static struct snd_minor snd_seq_reg =
 {
 	.comment =	"sequencer",
 	.f_ops =	&snd_seq_f_ops,
diff --git a/sound/core/seq/seq_clientmgr.h b/sound/core/seq/seq_clientmgr.h
index 3715c36..9df5624 100644
--- a/sound/core/seq/seq_clientmgr.h
+++ b/sound/core/seq/seq_clientmgr.h
@@ -30,24 +30,24 @@
 
 /* client manager */
 
-struct _snd_seq_user_client {
+struct snd_seq_user_client {
 	struct file *file;	/* file struct of client */
 	/* ... */
 	
 	/* fifo */
-	fifo_t *fifo;	/* queue for incoming events */
+	struct snd_seq_fifo *fifo;	/* queue for incoming events */
 	int fifo_pool_size;
 };
 
-struct _snd_seq_kernel_client {
-	snd_card_t *card;
+struct snd_seq_kernel_client {
+	struct snd_card *card;
 	/* pointer to client functions */
 	void *private_data;			/* private data for client */
 	/* ... */
 };
 
 
-struct _snd_seq_client {
+struct snd_seq_client {
 	snd_seq_client_type_t type;
 	unsigned int accept_input: 1,
 		accept_output: 1;
@@ -65,40 +65,42 @@
 	int convert32;		/* convert 32->64bit */
 
 	/* output pool */
-	pool_t *pool;		/* memory pool for this client */
+	struct snd_seq_pool *pool;		/* memory pool for this client */
 
 	union {
-		user_client_t user;
-		kernel_client_t kernel;
+		struct snd_seq_user_client user;
+		struct snd_seq_kernel_client kernel;
 	} data;
 };
 
 /* usage statistics */
-typedef struct {
+struct snd_seq_usage {
 	int cur;
 	int peak;
-} usage_t;
+};
 
 
-extern int client_init_data(void);
-extern int snd_sequencer_device_init(void);
-extern void snd_sequencer_device_done(void);
+int client_init_data(void);
+int snd_sequencer_device_init(void);
+void snd_sequencer_device_done(void);
 
 /* get locked pointer to client */
-extern client_t *snd_seq_client_use_ptr(int clientid);
+struct snd_seq_client *snd_seq_client_use_ptr(int clientid);
 
 /* unlock pointer to client */
 #define snd_seq_client_unlock(client) snd_use_lock_free(&(client)->use_lock)
 
 /* dispatch event to client(s) */
-extern int snd_seq_dispatch_event(snd_seq_event_cell_t *cell, int atomic, int hop);
+int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop);
 
 /* exported to other modules */
-extern int snd_seq_register_kernel_client(snd_seq_client_callback_t *callback, void *private_data);
-extern int snd_seq_unregister_kernel_client(int client);
-extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop);
-int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev, struct file *file, int atomic, int hop);
+int snd_seq_register_kernel_client(struct snd_seq_client_callback *callback, void *private_data);
+int snd_seq_unregister_kernel_client(int client);
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
+					   struct file *file, int atomic, int hop);
 int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait);
-int snd_seq_client_notify_subscription(int client, int port, snd_seq_port_subscribe_t *info, int evtype);
+int snd_seq_client_notify_subscription(int client, int port,
+				       struct snd_seq_port_subscribe *info, int evtype);
 
 #endif
diff --git a/sound/core/seq/seq_compat.c b/sound/core/seq/seq_compat.c
index 902ad8b..9628c06 100644
--- a/sound/core/seq/seq_compat.c
+++ b/sound/core/seq/seq_compat.c
@@ -22,8 +22,8 @@
 
 #include <linux/compat.h>
 
-struct sndrv_seq_port_info32 {
-	struct sndrv_seq_addr addr;	/* client/port numbers */
+struct snd_seq_port_info32 {
+	struct snd_seq_addr addr;	/* client/port numbers */
 	char name[64];			/* port name */
 
 	u32 capability;	/* port capability bits */
@@ -41,11 +41,11 @@
 	char reserved[59];		/* for future use */
 };
 
-static int snd_seq_call_port_info_ioctl(client_t *client, unsigned int cmd,
-					struct sndrv_seq_port_info32 __user *data32)
+static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned int cmd,
+					struct snd_seq_port_info32 __user *data32)
 {
 	int err = -EFAULT;
-	snd_seq_port_info_t *data;
+	struct snd_seq_port_info *data;
 	mm_segment_t fs;
 
 	data = kmalloc(sizeof(*data), GFP_KERNEL);
@@ -80,16 +80,16 @@
  */
 
 enum {
-	SNDRV_SEQ_IOCTL_CREATE_PORT32 = _IOWR('S', 0x20, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_DELETE_PORT32 = _IOW ('S', 0x21, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_GET_PORT_INFO32 = _IOWR('S', 0x22, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_SET_PORT_INFO32 = _IOW ('S', 0x23, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT32 = _IOWR('S', 0x52, struct sndrv_seq_port_info32),
+	SNDRV_SEQ_IOCTL_CREATE_PORT32 = _IOWR('S', 0x20, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_DELETE_PORT32 = _IOW ('S', 0x21, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_GET_PORT_INFO32 = _IOWR('S', 0x22, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_SET_PORT_INFO32 = _IOW ('S', 0x23, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT32 = _IOWR('S', 0x52, struct snd_seq_port_info32),
 };
 
 static long snd_seq_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 	void __user *argp = compat_ptr(arg);
 
 	snd_assert(client != NULL, return -ENXIO);
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index 252b527..3f935a1 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -50,11 +50,6 @@
 MODULE_DESCRIPTION("ALSA sequencer device management");
 MODULE_LICENSE("GPL");
 
-/*
- * driver list
- */
-typedef struct ops_list ops_list_t;
-
 /* driver state */
 #define DRIVER_EMPTY		0
 #define DRIVER_LOADED		(1<<0)
@@ -68,7 +63,7 @@
 	int argsize;		/* argument size */
 
 	/* operators */
-	snd_seq_dev_ops_t ops;
+	struct snd_seq_dev_ops ops;
 
 	/* registred devices */
 	struct list_head dev_list;	/* list of devices */
@@ -83,35 +78,36 @@
 static LIST_HEAD(opslist);
 static int num_ops;
 static DECLARE_MUTEX(ops_mutex);
-static snd_info_entry_t *info_entry = NULL;
+static struct snd_info_entry *info_entry = NULL;
 
 /*
  * prototypes
  */
-static int snd_seq_device_free(snd_seq_device_t *dev);
-static int snd_seq_device_dev_free(snd_device_t *device);
-static int snd_seq_device_dev_register(snd_device_t *device);
-static int snd_seq_device_dev_disconnect(snd_device_t *device);
-static int snd_seq_device_dev_unregister(snd_device_t *device);
+static int snd_seq_device_free(struct snd_seq_device *dev);
+static int snd_seq_device_dev_free(struct snd_device *device);
+static int snd_seq_device_dev_register(struct snd_device *device);
+static int snd_seq_device_dev_disconnect(struct snd_device *device);
+static int snd_seq_device_dev_unregister(struct snd_device *device);
 
-static int init_device(snd_seq_device_t *dev, ops_list_t *ops);
-static int free_device(snd_seq_device_t *dev, ops_list_t *ops);
-static ops_list_t *find_driver(char *id, int create_if_empty);
-static ops_list_t *create_driver(char *id);
-static void unlock_driver(ops_list_t *ops);
+static int init_device(struct snd_seq_device *dev, struct ops_list *ops);
+static int free_device(struct snd_seq_device *dev, struct ops_list *ops);
+static struct ops_list *find_driver(char *id, int create_if_empty);
+static struct ops_list *create_driver(char *id);
+static void unlock_driver(struct ops_list *ops);
 static void remove_drivers(void);
 
 /*
  * show all drivers and their status
  */
 
-static void snd_seq_device_info(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_seq_device_info(struct snd_info_entry *entry,
+				struct snd_info_buffer *buffer)
 {
 	struct list_head *head;
 
 	down(&ops_mutex);
 	list_for_each(head, &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		snd_iprintf(buffer, "snd-%s%s%s%s,%d\n",
 				ops->id,
 				ops->driver & DRIVER_LOADED ? ",loaded" : (ops->driver == DRIVER_EMPTY ? ",empty" : ""),
@@ -156,7 +152,7 @@
 
 	down(&ops_mutex);
 	list_for_each(head, &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		if (! (ops->driver & DRIVER_LOADED) &&
 		    ! (ops->driver & DRIVER_REQUESTED)) {
 			ops->used++;
@@ -178,13 +174,13 @@
  * id = id of driver
  * result = return pointer (NULL allowed if unnecessary)
  */
-int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize,
-		       snd_seq_device_t **result)
+int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize,
+		       struct snd_seq_device **result)
 {
-	snd_seq_device_t *dev;
-	ops_list_t *ops;
+	struct snd_seq_device *dev;
+	struct ops_list *ops;
 	int err;
-	static snd_device_ops_t dops = {
+	static struct snd_device_ops dops = {
 		.dev_free = snd_seq_device_dev_free,
 		.dev_register = snd_seq_device_dev_register,
 		.dev_disconnect = snd_seq_device_dev_disconnect,
@@ -235,9 +231,9 @@
 /*
  * free the existing device
  */
-static int snd_seq_device_free(snd_seq_device_t *dev)
+static int snd_seq_device_free(struct snd_seq_device *dev)
 {
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	snd_assert(dev != NULL, return -EINVAL);
 
@@ -261,19 +257,19 @@
 	return 0;
 }
 
-static int snd_seq_device_dev_free(snd_device_t *device)
+static int snd_seq_device_dev_free(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
+	struct snd_seq_device *dev = device->device_data;
 	return snd_seq_device_free(dev);
 }
 
 /*
  * register the device
  */
-static int snd_seq_device_dev_register(snd_device_t *device)
+static int snd_seq_device_dev_register(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
-	ops_list_t *ops;
+	struct snd_seq_device *dev = device->device_data;
+	struct ops_list *ops;
 
 	ops = find_driver(dev->id, 0);
 	if (ops == NULL)
@@ -292,10 +288,10 @@
 /*
  * disconnect the device
  */
-static int snd_seq_device_dev_disconnect(snd_device_t *device)
+static int snd_seq_device_dev_disconnect(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
-	ops_list_t *ops;
+	struct snd_seq_device *dev = device->device_data;
+	struct ops_list *ops;
 
 	ops = find_driver(dev->id, 0);
 	if (ops == NULL)
@@ -310,9 +306,9 @@
 /*
  * unregister the existing device
  */
-static int snd_seq_device_dev_unregister(snd_device_t *device)
+static int snd_seq_device_dev_unregister(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
+	struct snd_seq_device *dev = device->device_data;
 	return snd_seq_device_free(dev);
 }
 
@@ -321,10 +317,11 @@
  * id = driver id
  * entry = driver operators - duplicated to each instance
  */
-int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsize)
+int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
+				   int argsize)
 {
 	struct list_head *head;
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	if (id == NULL || entry == NULL ||
 	    entry->init_device == NULL || entry->free_device == NULL)
@@ -351,7 +348,7 @@
 
 	/* initialize existing devices if necessary */
 	list_for_each(head, &ops->dev_list) {
-		snd_seq_device_t *dev = list_entry(head, snd_seq_device_t, list);
+		struct snd_seq_device *dev = list_entry(head, struct snd_seq_device, list);
 		init_device(dev, ops);
 	}
 	up(&ops->reg_mutex);
@@ -366,9 +363,9 @@
 /*
  * create driver record
  */
-static ops_list_t * create_driver(char *id)
+static struct ops_list * create_driver(char *id)
 {
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	ops = kmalloc(sizeof(*ops), GFP_KERNEL);
 	if (ops == NULL)
@@ -399,14 +396,15 @@
 int snd_seq_device_unregister_driver(char *id)
 {
 	struct list_head *head;
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	ops = find_driver(id, 0);
 	if (ops == NULL)
 		return -ENXIO;
 	if (! (ops->driver & DRIVER_LOADED) ||
 	    (ops->driver & DRIVER_LOCKED)) {
-		snd_printk(KERN_ERR "driver_unregister: cannot unload driver '%s': status=%x\n", id, ops->driver);
+		snd_printk(KERN_ERR "driver_unregister: cannot unload driver '%s': status=%x\n",
+			   id, ops->driver);
 		unlock_driver(ops);
 		return -EBUSY;
 	}
@@ -415,13 +413,14 @@
 	down(&ops->reg_mutex);
 	ops->driver |= DRIVER_LOCKED; /* do not remove this driver recursively */
 	list_for_each(head, &ops->dev_list) {
-		snd_seq_device_t *dev = list_entry(head, snd_seq_device_t, list);
+		struct snd_seq_device *dev = list_entry(head, struct snd_seq_device, list);
 		free_device(dev, ops);
 	}
 
 	ops->driver = 0;
 	if (ops->num_init_devices > 0)
-		snd_printk(KERN_ERR "free_driver: init_devices > 0!! (%d)\n", ops->num_init_devices);
+		snd_printk(KERN_ERR "free_driver: init_devices > 0!! (%d)\n",
+			   ops->num_init_devices);
 	up(&ops->reg_mutex);
 
 	unlock_driver(ops);
@@ -443,7 +442,7 @@
 	down(&ops_mutex);
 	head = opslist.next;
 	while (head != &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		if (! (ops->driver & DRIVER_LOADED) &&
 		    ops->used == 0 && ops->num_devices == 0) {
 			head = head->next;
@@ -459,21 +458,23 @@
 /*
  * initialize the device - call init_device operator
  */
-static int init_device(snd_seq_device_t *dev, ops_list_t *ops)
+static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
 {
 	if (! (ops->driver & DRIVER_LOADED))
 		return 0; /* driver is not loaded yet */
 	if (dev->status != SNDRV_SEQ_DEVICE_FREE)
 		return 0; /* already initialized */
 	if (ops->argsize != dev->argsize) {
-		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n", dev->name, ops->id, ops->argsize, dev->argsize);
+		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n",
+			   dev->name, ops->id, ops->argsize, dev->argsize);
 		return -EINVAL;
 	}
 	if (ops->ops.init_device(dev) >= 0) {
 		dev->status = SNDRV_SEQ_DEVICE_REGISTERED;
 		ops->num_init_devices++;
 	} else {
-		snd_printk(KERN_ERR "init_device failed: %s: %s\n", dev->name, dev->id);
+		snd_printk(KERN_ERR "init_device failed: %s: %s\n",
+			   dev->name, dev->id);
 	}
 
 	return 0;
@@ -482,7 +483,7 @@
 /*
  * release the device - call free_device operator
  */
-static int free_device(snd_seq_device_t *dev, ops_list_t *ops)
+static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
 {
 	int result;
 
@@ -491,7 +492,8 @@
 	if (dev->status != SNDRV_SEQ_DEVICE_REGISTERED)
 		return 0; /* not registered */
 	if (ops->argsize != dev->argsize) {
-		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n", dev->name, ops->id, ops->argsize, dev->argsize);
+		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n",
+			   dev->name, ops->id, ops->argsize, dev->argsize);
 		return -EINVAL;
 	}
 	if ((result = ops->ops.free_device(dev)) >= 0 || result == -ENXIO) {
@@ -499,7 +501,8 @@
 		dev->driver_data = NULL;
 		ops->num_init_devices--;
 	} else {
-		snd_printk(KERN_ERR "free_device failed: %s: %s\n", dev->name, dev->id);
+		snd_printk(KERN_ERR "free_device failed: %s: %s\n",
+			   dev->name, dev->id);
 	}
 
 	return 0;
@@ -508,13 +511,13 @@
 /*
  * find the matching driver with given id
  */
-static ops_list_t * find_driver(char *id, int create_if_empty)
+static struct ops_list * find_driver(char *id, int create_if_empty)
 {
 	struct list_head *head;
 
 	down(&ops_mutex);
 	list_for_each(head, &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		if (strcmp(ops->id, id) == 0) {
 			ops->used++;
 			up(&ops_mutex);
@@ -527,7 +530,7 @@
 	return NULL;
 }
 
-static void unlock_driver(ops_list_t *ops)
+static void unlock_driver(struct ops_list *ops)
 {
 	down(&ops_mutex);
 	ops->used--;
@@ -541,7 +544,8 @@
 
 static int __init alsa_seq_device_init(void)
 {
-	info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers", snd_seq_root);
+	info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers",
+						  snd_seq_root);
 	if (info_entry == NULL)
 		return -ENOMEM;
 	info_entry->content = SNDRV_INFO_CONTENT_TEXT;
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index 5dd0e6a..8101a47 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -73,12 +73,12 @@
 module_param(duplex, bool, 0444);
 MODULE_PARM_DESC(duplex, "create DUPLEX ports");
 
-typedef struct snd_seq_dummy_port {
+struct snd_seq_dummy_port {
 	int client;
 	int port;
 	int duplex;
 	int connect;
-} snd_seq_dummy_port_t;
+};
 
 static int my_client = -1;
 
@@ -88,11 +88,11 @@
  * Note: this callback is called only after all subscribers are removed.
  */
 static int
-dummy_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+dummy_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_seq_dummy_port_t *p;
+	struct snd_seq_dummy_port *p;
 	int i;
-	snd_seq_event_t ev;
+	struct snd_seq_event ev;
 
 	p = private_data;
 	memset(&ev, 0, sizeof(ev));
@@ -116,10 +116,11 @@
  * event input callback - just redirect events to subscribers
  */
 static int
-dummy_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop)
+dummy_input(struct snd_seq_event *ev, int direct, void *private_data,
+	    int atomic, int hop)
 {
-	snd_seq_dummy_port_t *p;
-	snd_seq_event_t tmpev;
+	struct snd_seq_dummy_port *p;
+	struct snd_seq_event tmpev;
 
 	p = private_data;
 	if (ev->source.client == SNDRV_SEQ_CLIENT_SYSTEM ||
@@ -146,12 +147,12 @@
 /*
  * create a port
  */
-static snd_seq_dummy_port_t __init *
+static struct snd_seq_dummy_port __init *
 create_port(int idx, int type)
 {
-	snd_seq_port_info_t pinfo;
-	snd_seq_port_callback_t pcb;
-	snd_seq_dummy_port_t *rec;
+	struct snd_seq_port_info pinfo;
+	struct snd_seq_port_callback pcb;
+	struct snd_seq_dummy_port *rec;
 
 	if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL)
 		return NULL;
@@ -192,9 +193,9 @@
 static int __init
 register_client(void)
 {
-	snd_seq_client_callback_t cb;
-	snd_seq_client_info_t cinfo;
-	snd_seq_dummy_port_t *rec1, *rec2;
+	struct snd_seq_client_callback cb;
+	struct snd_seq_client_info cinfo;
+	struct snd_seq_dummy_port *rec1, *rec2;
 	int i;
 
 	if (ports < 1) {
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c
index 4767cfd..6b055ae 100644
--- a/sound/core/seq/seq_fifo.c
+++ b/sound/core/seq/seq_fifo.c
@@ -29,9 +29,9 @@
 /* FIFO */
 
 /* create new fifo */
-fifo_t *snd_seq_fifo_new(int poolsize)
+struct snd_seq_fifo *snd_seq_fifo_new(int poolsize)
 {
-	fifo_t *f;
+	struct snd_seq_fifo *f;
 
 	f = kzalloc(sizeof(*f), GFP_KERNEL);
 	if (f == NULL) {
@@ -62,9 +62,9 @@
 	return f;
 }
 
-void snd_seq_fifo_delete(fifo_t **fifo)
+void snd_seq_fifo_delete(struct snd_seq_fifo **fifo)
 {
-	fifo_t *f;
+	struct snd_seq_fifo *f;
 
 	snd_assert(fifo != NULL, return);
 	f = *fifo;
@@ -88,12 +88,12 @@
 	kfree(f);
 }
 
-static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f);
+static struct snd_seq_event_cell *fifo_cell_out(struct snd_seq_fifo *f);
 
 /* clear queue */
-void snd_seq_fifo_clear(fifo_t *f)
+void snd_seq_fifo_clear(struct snd_seq_fifo *f)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 
 	/* clear overflow flag */
@@ -110,9 +110,10 @@
 
 
 /* enqueue event to fifo */
-int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event)
+int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
+			  struct snd_seq_event *event)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 	int err;
 
@@ -148,9 +149,9 @@
 }
 
 /* dequeue cell from fifo */
-static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f)
+static struct snd_seq_event_cell *fifo_cell_out(struct snd_seq_fifo *f)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if ((cell = f->head) != NULL) {
 		f->head = cell->next;
@@ -167,9 +168,10 @@
 }
 
 /* dequeue cell from fifo and copy on user space */
-int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock)
+int snd_seq_fifo_cell_out(struct snd_seq_fifo *f,
+			  struct snd_seq_event_cell **cellp, int nonblock)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 	wait_queue_t wait;
 
@@ -202,7 +204,8 @@
 }
 
 
-void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell)
+void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f,
+			       struct snd_seq_event_cell *cell)
 {
 	unsigned long flags;
 
@@ -217,18 +220,19 @@
 
 
 /* polling; return non-zero if queue is available */
-int snd_seq_fifo_poll_wait(fifo_t *f, struct file *file, poll_table *wait)
+int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file,
+			   poll_table *wait)
 {
 	poll_wait(file, &f->input_sleep, wait);
 	return (f->cells > 0);
 }
 
 /* change the size of pool; all old events are removed */
-int snd_seq_fifo_resize(fifo_t *f, int poolsize)
+int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize)
 {
 	unsigned long flags;
-	pool_t *newpool, *oldpool;
-	snd_seq_event_cell_t *cell, *next, *oldhead;
+	struct snd_seq_pool *newpool, *oldpool;
+	struct snd_seq_event_cell *cell, *next, *oldhead;
 
 	snd_assert(f != NULL && f->pool != NULL, return -EINVAL);
 
diff --git a/sound/core/seq/seq_fifo.h b/sound/core/seq/seq_fifo.h
index d677c26..062c446 100644
--- a/sound/core/seq/seq_fifo.h
+++ b/sound/core/seq/seq_fifo.h
@@ -27,46 +27,46 @@
 
 /* === FIFO === */
 
-typedef struct {
-	pool_t *pool;			/* FIFO pool */
-	snd_seq_event_cell_t* head;    	/* pointer to head of fifo */
-	snd_seq_event_cell_t* tail;    	/* pointer to tail of fifo */
+struct snd_seq_fifo {
+	struct snd_seq_pool *pool;		/* FIFO pool */
+	struct snd_seq_event_cell *head;    	/* pointer to head of fifo */
+	struct snd_seq_event_cell *tail;    	/* pointer to tail of fifo */
 	int cells;
 	spinlock_t lock;
 	snd_use_lock_t use_lock;
 	wait_queue_head_t input_sleep;
 	atomic_t overflow;
 
-} fifo_t;
+};
 
 /* create new fifo (constructor) */
-extern fifo_t *snd_seq_fifo_new(int poolsize);
+struct snd_seq_fifo *snd_seq_fifo_new(int poolsize);
 
 /* delete fifo (destructor) */
-extern void snd_seq_fifo_delete(fifo_t **f);
+void snd_seq_fifo_delete(struct snd_seq_fifo **f);
 
 
 /* enqueue event to fifo */
-extern int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event);
+int snd_seq_fifo_event_in(struct snd_seq_fifo *f, struct snd_seq_event *event);
 
 /* lock fifo from release */
 #define snd_seq_fifo_lock(fifo)		snd_use_lock_use(&(fifo)->use_lock)
 #define snd_seq_fifo_unlock(fifo)	snd_use_lock_free(&(fifo)->use_lock)
 
 /* get a cell from fifo - fifo should be locked */
-int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock);
+int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, struct snd_seq_event_cell **cellp, int nonblock);
 
 /* free dequeued cell - fifo should be locked */
-extern void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell);
+void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, struct snd_seq_event_cell *cell);
 
 /* clean up queue */
-extern void snd_seq_fifo_clear(fifo_t *f);
+void snd_seq_fifo_clear(struct snd_seq_fifo *f);
 
 /* polling */
-extern int snd_seq_fifo_poll_wait(fifo_t *f, struct file *file, poll_table *wait);
+int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table *wait);
 
 /* resize pool in fifo */
-int snd_seq_fifo_resize(fifo_t *f, int poolsize);
+int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize);
 
 
 #endif
diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c
index b50b695..3257cf4 100644
--- a/sound/core/seq/seq_info.c
+++ b/sound/core/seq/seq_info.c
@@ -28,15 +28,16 @@
 #include "seq_timer.h"
 
 
-static snd_info_entry_t *queues_entry;
-static snd_info_entry_t *clients_entry;
-static snd_info_entry_t *timer_entry;
+static struct snd_info_entry *queues_entry;
+static struct snd_info_entry *clients_entry;
+static struct snd_info_entry *timer_entry;
 
 
-static snd_info_entry_t * __init
-create_info_entry(char *name, int size, void (*read)(snd_info_entry_t *, snd_info_buffer_t *))
+static struct snd_info_entry * __init
+create_info_entry(char *name, int size, void (*read)(struct snd_info_entry *,
+						     struct snd_info_buffer *))
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, name, snd_seq_root);
 	if (entry == NULL)
diff --git a/sound/core/seq/seq_info.h b/sound/core/seq/seq_info.h
index efd099a..5a91ebc 100644
--- a/sound/core/seq/seq_info.h
+++ b/sound/core/seq/seq_info.h
@@ -24,9 +24,9 @@
 #include <sound/info.h>
 #include <sound/seq_kernel.h>
 
-void snd_seq_info_clients_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
-void snd_seq_info_timer_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
-void snd_seq_info_queues_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
+void snd_seq_info_clients_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
+void snd_seq_info_timer_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
+void snd_seq_info_queues_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
 
 
 int snd_seq_info_init( void );
diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c
index 1d525b1..4874520 100644
--- a/sound/core/seq/seq_instr.c
+++ b/sound/core/seq/seq_instr.c
@@ -31,7 +31,7 @@
 MODULE_LICENSE("GPL");
 
 
-static void snd_instr_lock_ops(snd_seq_kinstr_list_t *list)
+static void snd_instr_lock_ops(struct snd_seq_kinstr_list *list)
 {
 	if (!(list->flags & SNDRV_SEQ_INSTR_FLG_DIRECT)) {
 		spin_lock_irqsave(&list->ops_lock, list->ops_flags);
@@ -40,7 +40,7 @@
 	}
 }
 
-static void snd_instr_unlock_ops(snd_seq_kinstr_list_t *list)
+static void snd_instr_unlock_ops(struct snd_seq_kinstr_list *list)
 {
 	if (!(list->flags & SNDRV_SEQ_INSTR_FLG_DIRECT)) {
 		spin_unlock_irqrestore(&list->ops_lock, list->ops_flags);
@@ -49,18 +49,18 @@
 	}
 }
 
-static snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
+static struct snd_seq_kinstr *snd_seq_instr_new(int add_len, int atomic)
 {
-	snd_seq_kinstr_t *instr;
+	struct snd_seq_kinstr *instr;
 	
-	instr = kzalloc(sizeof(snd_seq_kinstr_t) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL);
+	instr = kzalloc(sizeof(struct snd_seq_kinstr) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL);
 	if (instr == NULL)
 		return NULL;
 	instr->add_len = add_len;
 	return instr;
 }
 
-static int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
+static int snd_seq_instr_free(struct snd_seq_kinstr *instr, int atomic)
 {
 	int result = 0;
 
@@ -73,11 +73,11 @@
 	return result;
 }
 
-snd_seq_kinstr_list_t *snd_seq_instr_list_new(void)
+struct snd_seq_kinstr_list *snd_seq_instr_list_new(void)
 {
-	snd_seq_kinstr_list_t *list;
+	struct snd_seq_kinstr_list *list;
 
-	list = kzalloc(sizeof(snd_seq_kinstr_list_t), GFP_KERNEL);
+	list = kzalloc(sizeof(struct snd_seq_kinstr_list), GFP_KERNEL);
 	if (list == NULL)
 		return NULL;
 	spin_lock_init(&list->lock);
@@ -87,11 +87,11 @@
 	return list;
 }
 
-void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list_ptr)
+void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr)
 {
-	snd_seq_kinstr_list_t *list;
-	snd_seq_kinstr_t *instr;
-	snd_seq_kcluster_t *cluster;
+	struct snd_seq_kinstr_list *list;
+	struct snd_seq_kinstr *instr;
+	struct snd_seq_kcluster *cluster;
 	int idx;
 	unsigned long flags;
 
@@ -125,8 +125,8 @@
 	kfree(list);
 }
 
-static int instr_free_compare(snd_seq_kinstr_t *instr,
-			      snd_seq_instr_header_t *ifree,
+static int instr_free_compare(struct snd_seq_kinstr *instr,
+			      struct snd_seq_instr_header *ifree,
 			      unsigned int client)
 {
 	switch (ifree->cmd) {
@@ -160,12 +160,12 @@
 	return 1;
 }
 
-int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list,
-			         snd_seq_instr_header_t *ifree,
+int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
+			         struct snd_seq_instr_header *ifree,
 			         int client,
 			         int atomic)
 {
-	snd_seq_kinstr_t *instr, *prev, *next, *flist;
+	struct snd_seq_kinstr *instr, *prev, *next, *flist;
 	int idx;
 	unsigned long flags;
 
@@ -209,7 +209,7 @@
 	return 0;	
 }
 
-static int compute_hash_instr_key(snd_seq_instr_t *instr)
+static int compute_hash_instr_key(struct snd_seq_instr *instr)
 {
 	int result;
 	
@@ -233,7 +233,7 @@
 }
 #endif
 
-static int compare_instr(snd_seq_instr_t *i1, snd_seq_instr_t *i2, int exact)
+static int compare_instr(struct snd_seq_instr *i1, struct snd_seq_instr *i2, int exact)
 {
 	if (exact) {
 		if (i1->cluster != i2->cluster ||
@@ -262,14 +262,14 @@
 	}
 }
 
-snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
-				     snd_seq_instr_t *instr,
-				     int exact,
-				     int follow_alias)
+struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list,
+					  struct snd_seq_instr *instr,
+					  int exact,
+					  int follow_alias)
 {
 	unsigned long flags;
 	int depth = 0;
-	snd_seq_kinstr_t *result;
+	struct snd_seq_kinstr *result;
 
 	if (list == NULL || instr == NULL)
 		return NULL;
@@ -279,7 +279,7 @@
 	while (result) {
 		if (!compare_instr(&result->instr, instr, exact)) {
 			if (follow_alias && (result->type == SNDRV_SEQ_INSTR_ATYPE_ALIAS)) {
-				instr = (snd_seq_instr_t *)KINSTR_DATA(result);
+				instr = (struct snd_seq_instr *)KINSTR_DATA(result);
 				if (++depth > 10)
 					goto __not_found;
 				goto __again;
@@ -295,8 +295,8 @@
 	return NULL;
 }
 
-void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list,
-			    snd_seq_kinstr_t *instr)
+void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list,
+			    struct snd_seq_kinstr *instr)
 {
 	unsigned long flags;
 
@@ -311,7 +311,8 @@
 	spin_unlock_irqrestore(&list->lock, flags);
 }
 
-static snd_seq_kinstr_ops_t *instr_ops(snd_seq_kinstr_ops_t *ops, char *instr_type)
+static struct snd_seq_kinstr_ops *instr_ops(struct snd_seq_kinstr_ops *ops,
+					    char *instr_type)
 {
 	while (ops) {
 		if (!strcmp(ops->instr_type, instr_type))
@@ -321,11 +322,11 @@
 	return NULL;
 }
 
-static int instr_result(snd_seq_event_t *ev,
+static int instr_result(struct snd_seq_event *ev,
 			int type, int result,
 			int atomic)
 {
-	snd_seq_event_t sev;
+	struct snd_seq_event sev;
 	
 	memset(&sev, 0, sizeof(sev));
 	sev.type = SNDRV_SEQ_EVENT_RESULT;
@@ -345,9 +346,9 @@
 	return snd_seq_kernel_client_dispatch(sev.source.client, &sev, atomic, 0);
 }
 
-static int instr_begin(snd_seq_kinstr_ops_t *ops,
-		       snd_seq_kinstr_list_t *list,
-		       snd_seq_event_t *ev,
+static int instr_begin(struct snd_seq_kinstr_ops *ops,
+		       struct snd_seq_kinstr_list *list,
+		       struct snd_seq_event *ev,
 		       int atomic, int hop)
 {
 	unsigned long flags;
@@ -362,9 +363,9 @@
 	return instr_result(ev, SNDRV_SEQ_EVENT_INSTR_BEGIN, 0, atomic);
 }
 
-static int instr_end(snd_seq_kinstr_ops_t *ops,
-		     snd_seq_kinstr_list_t *list,
-		     snd_seq_event_t *ev,
+static int instr_end(struct snd_seq_kinstr_ops *ops,
+		     struct snd_seq_kinstr_list *list,
+		     struct snd_seq_event *ev,
 		     int atomic, int hop)
 {
 	unsigned long flags;
@@ -380,54 +381,55 @@
 	return instr_result(ev, SNDRV_SEQ_EVENT_INSTR_END, -EINVAL, atomic);
 }
 
-static int instr_info(snd_seq_kinstr_ops_t *ops,
-		      snd_seq_kinstr_list_t *list,
-		      snd_seq_event_t *ev,
+static int instr_info(struct snd_seq_kinstr_ops *ops,
+		      struct snd_seq_kinstr_list *list,
+		      struct snd_seq_event *ev,
 		      int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_format_info(snd_seq_kinstr_ops_t *ops,
-			     snd_seq_kinstr_list_t *list,
-			     snd_seq_event_t *ev,
+static int instr_format_info(struct snd_seq_kinstr_ops *ops,
+			     struct snd_seq_kinstr_list *list,
+			     struct snd_seq_event *ev,
 			     int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_reset(snd_seq_kinstr_ops_t *ops,
-		       snd_seq_kinstr_list_t *list,
-		       snd_seq_event_t *ev,
+static int instr_reset(struct snd_seq_kinstr_ops *ops,
+		       struct snd_seq_kinstr_list *list,
+		       struct snd_seq_event *ev,
 		       int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_status(snd_seq_kinstr_ops_t *ops,
-			snd_seq_kinstr_list_t *list,
-			snd_seq_event_t *ev,
+static int instr_status(struct snd_seq_kinstr_ops *ops,
+			struct snd_seq_kinstr_list *list,
+			struct snd_seq_event *ev,
 			int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_put(snd_seq_kinstr_ops_t *ops,
-		     snd_seq_kinstr_list_t *list,
-		     snd_seq_event_t *ev,
+static int instr_put(struct snd_seq_kinstr_ops *ops,
+		     struct snd_seq_kinstr_list *list,
+		     struct snd_seq_event *ev,
 		     int atomic, int hop)
 {
 	unsigned long flags;
-	snd_seq_instr_header_t put;
-	snd_seq_kinstr_t *instr;
+	struct snd_seq_instr_header put;
+	struct snd_seq_kinstr *instr;
 	int result = -EINVAL, len, key;
 
 	if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARUSR)
 		goto __return;
 
-	if (ev->data.ext.len < sizeof(snd_seq_instr_header_t))
+	if (ev->data.ext.len < sizeof(struct snd_seq_instr_header))
 		goto __return;
-	if (copy_from_user(&put, (void __user *)ev->data.ext.ptr, sizeof(snd_seq_instr_header_t))) {
+	if (copy_from_user(&put, (void __user *)ev->data.ext.ptr,
+			   sizeof(struct snd_seq_instr_header))) {
 		result = -EFAULT;
 		goto __return;
 	}
@@ -449,7 +451,7 @@
 	}
 	len = ops->add_len;
 	if (put.data.type == SNDRV_SEQ_INSTR_ATYPE_ALIAS)
-		len = sizeof(snd_seq_instr_t);
+		len = sizeof(struct snd_seq_instr);
 	instr = snd_seq_instr_new(len, atomic);
 	if (instr == NULL) {
 		snd_instr_unlock_ops(list);
@@ -463,8 +465,8 @@
 	if (instr->type == SNDRV_SEQ_INSTR_ATYPE_DATA) {
 		result = ops->put(ops->private_data,
 				  instr,
-				  (void __user *)ev->data.ext.ptr + sizeof(snd_seq_instr_header_t),
-				  ev->data.ext.len - sizeof(snd_seq_instr_header_t),
+				  (void __user *)ev->data.ext.ptr + sizeof(struct snd_seq_instr_header),
+				  ev->data.ext.len - sizeof(struct snd_seq_instr_header),
 				  atomic,
 				  put.cmd);
 		if (result < 0) {
@@ -486,21 +488,21 @@
 	return result;
 }
 
-static int instr_get(snd_seq_kinstr_ops_t *ops,
-		     snd_seq_kinstr_list_t *list,
-		     snd_seq_event_t *ev,
+static int instr_get(struct snd_seq_kinstr_ops *ops,
+		     struct snd_seq_kinstr_list *list,
+		     struct snd_seq_event *ev,
 		     int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_free(snd_seq_kinstr_ops_t *ops,
-		      snd_seq_kinstr_list_t *list,
-		      snd_seq_event_t *ev,
+static int instr_free(struct snd_seq_kinstr_ops *ops,
+		      struct snd_seq_kinstr_list *list,
+		      struct snd_seq_event *ev,
 		      int atomic, int hop)
 {
-	snd_seq_instr_header_t ifree;
-	snd_seq_kinstr_t *instr, *prev;
+	struct snd_seq_instr_header ifree;
+	struct snd_seq_kinstr *instr, *prev;
 	int result = -EINVAL;
 	unsigned long flags;
 	unsigned int hash;
@@ -508,9 +510,10 @@
 	if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARUSR)
 		goto __return;
 
-	if (ev->data.ext.len < sizeof(snd_seq_instr_header_t))
+	if (ev->data.ext.len < sizeof(struct snd_seq_instr_header))
 		goto __return;
-	if (copy_from_user(&ifree, (void __user *)ev->data.ext.ptr, sizeof(snd_seq_instr_header_t))) {
+	if (copy_from_user(&ifree, (void __user *)ev->data.ext.ptr,
+			   sizeof(struct snd_seq_instr_header))) {
 		result = -EFAULT;
 		goto __return;
 	}
@@ -548,7 +551,8 @@
 			list->hash[hash] = instr->next;
 		}
 		if (instr->ops && instr->ops->notify)
-			instr->ops->notify(instr->ops->private_data, instr, SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
+			instr->ops->notify(instr->ops->private_data, instr,
+					   SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
 		while (instr->use) {
 			spin_unlock_irqrestore(&list->lock, flags);
 			schedule_timeout_interruptible(1);
@@ -565,25 +569,25 @@
 	return result;
 }
 
-static int instr_list(snd_seq_kinstr_ops_t *ops,
-		      snd_seq_kinstr_list_t *list,
-		      snd_seq_event_t *ev,
+static int instr_list(struct snd_seq_kinstr_ops *ops,
+		      struct snd_seq_kinstr_list *list,
+		      struct snd_seq_event *ev,
 		      int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_cluster(snd_seq_kinstr_ops_t *ops,
-			 snd_seq_kinstr_list_t *list,
-			 snd_seq_event_t *ev,
+static int instr_cluster(struct snd_seq_kinstr_ops *ops,
+			 struct snd_seq_kinstr_list *list,
+			 struct snd_seq_event *ev,
 			 int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops,
-			snd_seq_kinstr_list_t *list,
-			snd_seq_event_t *ev,
+int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops,
+			struct snd_seq_kinstr_list *list,
+			struct snd_seq_event *ev,
 			int client,
 			int atomic,
 			int hop)
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index 8416bcf..9ee6c17 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -36,12 +36,12 @@
 #define semaphore_of(fp)	((fp)->f_dentry->d_inode->i_sem)
 
 
-static inline int snd_seq_pool_available(pool_t *pool)
+static inline int snd_seq_pool_available(struct snd_seq_pool *pool)
 {
 	return pool->total_elements - atomic_read(&pool->counter);
 }
 
-static inline int snd_seq_output_ok(pool_t *pool)
+static inline int snd_seq_output_ok(struct snd_seq_pool *pool)
 {
 	return snd_seq_pool_available(pool) >= pool->room;
 }
@@ -72,7 +72,7 @@
  * call dump function to expand external data.
  */
 
-static int get_var_len(const snd_seq_event_t *event)
+static int get_var_len(const struct snd_seq_event *event)
 {
 	if ((event->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
 		return -EINVAL;
@@ -80,10 +80,11 @@
 	return event->data.ext.len & ~SNDRV_SEQ_EXT_MASK;
 }
 
-int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data)
+int snd_seq_dump_var_event(const struct snd_seq_event *event,
+			   snd_seq_dump_func_t func, void *private_data)
 {
 	int len, err;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if ((len = get_var_len(event)) <= 0)
 		return len;
@@ -108,9 +109,9 @@
 		return func(private_data, event->data.ext.ptr, len);
 	}
 
-	cell = (snd_seq_event_cell_t*)event->data.ext.ptr;
+	cell = (struct snd_seq_event_cell *)event->data.ext.ptr;
 	for (; len > 0 && cell; cell = cell->next) {
-		int size = sizeof(snd_seq_event_t);
+		int size = sizeof(struct snd_seq_event);
 		if (len < size)
 			size = len;
 		err = func(private_data, &cell->event, size);
@@ -142,7 +143,8 @@
 	return 0;
 }
 
-int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned)
+int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
+			     int in_kernel, int size_aligned)
 {
 	int len, newlen;
 	int err;
@@ -174,17 +176,18 @@
  * release this cell, free extended data if available
  */
 
-static inline void free_cell(pool_t *pool, snd_seq_event_cell_t *cell)
+static inline void free_cell(struct snd_seq_pool *pool,
+			     struct snd_seq_event_cell *cell)
 {
 	cell->next = pool->free;
 	pool->free = cell;
 	atomic_dec(&pool->counter);
 }
 
-void snd_seq_cell_free(snd_seq_event_cell_t * cell)
+void snd_seq_cell_free(struct snd_seq_event_cell * cell)
 {
 	unsigned long flags;
-	pool_t *pool;
+	struct snd_seq_pool *pool;
 
 	snd_assert(cell != NULL, return);
 	pool = cell->pool;
@@ -194,7 +197,7 @@
 	free_cell(pool, cell);
 	if (snd_seq_ev_is_variable(&cell->event)) {
 		if (cell->event.data.ext.len & SNDRV_SEQ_EXT_CHAINED) {
-			snd_seq_event_cell_t *curp, *nextptr;
+			struct snd_seq_event_cell *curp, *nextptr;
 			curp = cell->event.data.ext.ptr;
 			for (; curp; curp = nextptr) {
 				nextptr = curp->next;
@@ -215,9 +218,11 @@
 /*
  * allocate an event cell.
  */
-static int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
+static int snd_seq_cell_alloc(struct snd_seq_pool *pool,
+			      struct snd_seq_event_cell **cellp,
+			      int nonblock, struct file *file)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 	int err = -EAGAIN;
 	wait_queue_t wait;
@@ -280,11 +285,13 @@
  * if the event has external data, the data is decomposed to additional
  * cells.
  */
-int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
+int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
+		      struct snd_seq_event_cell **cellp, int nonblock,
+		      struct file *file)
 {
 	int ncells, err;
 	unsigned int extlen;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	*cellp = NULL;
 
@@ -292,7 +299,7 @@
 	extlen = 0;
 	if (snd_seq_ev_is_variable(event)) {
 		extlen = event->data.ext.len & ~SNDRV_SEQ_EXT_MASK;
-		ncells = (extlen + sizeof(snd_seq_event_t) - 1) / sizeof(snd_seq_event_t);
+		ncells = (extlen + sizeof(struct snd_seq_event) - 1) / sizeof(struct snd_seq_event);
 	}
 	if (ncells >= pool->total_elements)
 		return -ENOMEM;
@@ -309,18 +316,18 @@
 		int len = extlen;
 		int is_chained = event->data.ext.len & SNDRV_SEQ_EXT_CHAINED;
 		int is_usrptr = event->data.ext.len & SNDRV_SEQ_EXT_USRPTR;
-		snd_seq_event_cell_t *src, *tmp, *tail;
+		struct snd_seq_event_cell *src, *tmp, *tail;
 		char *buf;
 
 		cell->event.data.ext.len = extlen | SNDRV_SEQ_EXT_CHAINED;
 		cell->event.data.ext.ptr = NULL;
 
-		src = (snd_seq_event_cell_t*)event->data.ext.ptr;
+		src = (struct snd_seq_event_cell *)event->data.ext.ptr;
 		buf = (char *)event->data.ext.ptr;
 		tail = NULL;
 
 		while (ncells-- > 0) {
-			int size = sizeof(snd_seq_event_t);
+			int size = sizeof(struct snd_seq_event);
 			if (len < size)
 				size = len;
 			err = snd_seq_cell_alloc(pool, &tmp, nonblock, file);
@@ -358,7 +365,8 @@
   
 
 /* poll wait */
-int snd_seq_pool_poll_wait(pool_t *pool, struct file *file, poll_table *wait)
+int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file,
+			   poll_table *wait)
 {
 	poll_wait(file, &pool->output_sleep, wait);
 	return snd_seq_output_ok(pool);
@@ -366,17 +374,17 @@
 
 
 /* allocate room specified number of events */
-int snd_seq_pool_init(pool_t *pool)
+int snd_seq_pool_init(struct snd_seq_pool *pool)
 {
 	int cell;
-	snd_seq_event_cell_t *cellptr;
+	struct snd_seq_event_cell *cellptr;
 	unsigned long flags;
 
 	snd_assert(pool != NULL, return -EINVAL);
 	if (pool->ptr)			/* should be atomic? */
 		return 0;
 
-	pool->ptr = vmalloc(sizeof(snd_seq_event_cell_t) * pool->size);
+	pool->ptr = vmalloc(sizeof(struct snd_seq_event_cell) * pool->size);
 	if (pool->ptr == NULL) {
 		snd_printd("seq: malloc for sequencer events failed\n");
 		return -ENOMEM;
@@ -402,10 +410,10 @@
 }
 
 /* remove events */
-int snd_seq_pool_done(pool_t *pool)
+int snd_seq_pool_done(struct snd_seq_pool *pool)
 {
 	unsigned long flags;
-	snd_seq_event_cell_t *ptr;
+	struct snd_seq_event_cell *ptr;
 	int max_count = 5 * HZ;
 
 	snd_assert(pool != NULL, return -EINVAL);
@@ -446,9 +454,9 @@
 
 
 /* init new memory pool */
-pool_t *snd_seq_pool_new(int poolsize)
+struct snd_seq_pool *snd_seq_pool_new(int poolsize)
 {
-	pool_t *pool;
+	struct snd_seq_pool *pool;
 
 	/* create pool block */
 	pool = kzalloc(sizeof(*pool), GFP_KERNEL);
@@ -472,9 +480,9 @@
 }
 
 /* remove memory pool */
-int snd_seq_pool_delete(pool_t **ppool)
+int snd_seq_pool_delete(struct snd_seq_pool **ppool)
 {
-	pool_t *pool = *ppool;
+	struct snd_seq_pool *pool = *ppool;
 
 	*ppool = NULL;
 	if (pool == NULL)
@@ -497,7 +505,8 @@
 
 
 /* exported to seq_clientmgr.c */
-void snd_seq_info_pool(snd_info_buffer_t * buffer, pool_t *pool, char *space)
+void snd_seq_info_pool(struct snd_info_buffer *buffer,
+		       struct snd_seq_pool *pool, char *space)
 {
 	if (pool == NULL)
 		return;
diff --git a/sound/core/seq/seq_memory.h b/sound/core/seq/seq_memory.h
index 6c4dde5..39c60d9 100644
--- a/sound/core/seq/seq_memory.h
+++ b/sound/core/seq/seq_memory.h
@@ -24,23 +24,21 @@
 #include <sound/seq_kernel.h>
 #include <linux/poll.h>
 
-typedef struct pool pool_t;
-
 /* container for sequencer event (internal use) */
-typedef struct snd_seq_event_cell_t {
-	snd_seq_event_t event;
-	pool_t *pool;				/* used pool */
-	struct snd_seq_event_cell_t *next;	/* next cell */
-} snd_seq_event_cell_t;
+struct snd_seq_event_cell {
+	struct snd_seq_event event;
+	struct snd_seq_pool *pool;				/* used pool */
+	struct snd_seq_event_cell *next;	/* next cell */
+};
 
 /* design note: the pool is a contigious block of memory, if we dynamicly
    want to add additional cells to the pool be better store this in another
    pool as we need to know the base address of the pool when releasing
    memory. */
 
-struct pool {
-	snd_seq_event_cell_t *ptr;	/* pointer to first event chunk */
-	snd_seq_event_cell_t *free;	/* pointer to the head of the free list */
+struct snd_seq_pool {
+	struct snd_seq_event_cell *ptr;	/* pointer to first event chunk */
+	struct snd_seq_event_cell *free;	/* pointer to the head of the free list */
 
 	int total_elements;	/* pool size actually allocated */
 	atomic_t counter;	/* cells free */
@@ -63,33 +61,34 @@
 	spinlock_t lock;
 };
 
-extern void snd_seq_cell_free(snd_seq_event_cell_t* cell);
+void snd_seq_cell_free(struct snd_seq_event_cell *cell);
 
-int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t **cellp, int nonblock, struct file *file);
+int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
+		      struct snd_seq_event_cell **cellp, int nonblock, struct file *file);
 
 /* return number of unused (free) cells */
-static inline int snd_seq_unused_cells(pool_t *pool)
+static inline int snd_seq_unused_cells(struct snd_seq_pool *pool)
 {
 	return pool ? pool->total_elements - atomic_read(&pool->counter) : 0;
 }
 
 /* return total number of allocated cells */
-static inline int snd_seq_total_cells(pool_t *pool)
+static inline int snd_seq_total_cells(struct snd_seq_pool *pool)
 {
 	return pool ? pool->total_elements : 0;
 }
 
 /* init pool - allocate events */
-int snd_seq_pool_init(pool_t *pool);
+int snd_seq_pool_init(struct snd_seq_pool *pool);
 
 /* done pool - free events */
-int snd_seq_pool_done(pool_t *pool);
+int snd_seq_pool_done(struct snd_seq_pool *pool);
 
 /* create pool */
-pool_t *snd_seq_pool_new(int poolsize);
+struct snd_seq_pool *snd_seq_pool_new(int poolsize);
 
 /* remove pool */
-int snd_seq_pool_delete(pool_t **pool);
+int snd_seq_pool_delete(struct snd_seq_pool **pool);
 
 /* init memory */
 int snd_sequencer_memory_init(void);
@@ -98,7 +97,7 @@
 void snd_sequencer_memory_done(void);
 
 /* polling */
-int snd_seq_pool_poll_wait(pool_t *pool, struct file *file, poll_table *wait);
+int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file, poll_table *wait);
 
 
 #endif
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index f89f40f..f88d2e3 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -51,40 +51,40 @@
 MODULE_PARM_DESC(input_buffer_size, "Input buffer size in bytes.");
 
 /* data for this midi synth driver */
-typedef struct {
-	snd_card_t *card;
+struct seq_midisynth {
+	struct snd_card *card;
 	int device;
 	int subdevice;
-	snd_rawmidi_file_t input_rfile;
-	snd_rawmidi_file_t output_rfile;
+	struct snd_rawmidi_file input_rfile;
+	struct snd_rawmidi_file output_rfile;
 	int seq_client;
 	int seq_port;
-	snd_midi_event_t *parser;
-} seq_midisynth_t;
+	struct snd_midi_event *parser;
+};
 
-typedef struct {
+struct seq_midisynth_client {
 	int seq_client;
 	int num_ports;
 	int ports_per_device[SNDRV_RAWMIDI_DEVICES];
- 	seq_midisynth_t *ports[SNDRV_RAWMIDI_DEVICES];
-} seq_midisynth_client_t;
+ 	struct seq_midisynth *ports[SNDRV_RAWMIDI_DEVICES];
+};
 
-static seq_midisynth_client_t *synths[SNDRV_CARDS];
+static struct seq_midisynth_client *synths[SNDRV_CARDS];
 static DECLARE_MUTEX(register_mutex);
 
 /* handle rawmidi input event (MIDI v1.0 stream) */
-static void snd_midi_input_event(snd_rawmidi_substream_t * substream)
+static void snd_midi_input_event(struct snd_rawmidi_substream *substream)
 {
-	snd_rawmidi_runtime_t *runtime;
-	seq_midisynth_t *msynth;
-	snd_seq_event_t ev;
+	struct snd_rawmidi_runtime *runtime;
+	struct seq_midisynth *msynth;
+	struct snd_seq_event ev;
 	char buf[16], *pbuf;
 	long res, count;
 
 	if (substream == NULL)
 		return;
 	runtime = substream->runtime;
-	msynth = (seq_midisynth_t *) runtime->private_data;
+	msynth = runtime->private_data;
 	if (msynth == NULL)
 		return;
 	memset(&ev, 0, sizeof(ev));
@@ -112,9 +112,9 @@
 	}
 }
 
-static int dump_midi(snd_rawmidi_substream_t *substream, const char *buf, int count)
+static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, int count)
 {
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi_runtime *runtime;
 	int tmp;
 
 	snd_assert(substream != NULL || buf != NULL, return -EINVAL);
@@ -128,12 +128,12 @@
 	return 0;
 }
 
-static int event_process_midi(snd_seq_event_t * ev, int direct,
+static int event_process_midi(struct snd_seq_event *ev, int direct,
 			      void *private_data, int atomic, int hop)
 {
-	seq_midisynth_t *msynth = (seq_midisynth_t *) private_data;
+	struct seq_midisynth *msynth = private_data;
 	unsigned char msg[10];	/* buffer for constructing midi messages */
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi_substream *substream;
 	int len;
 
 	snd_assert(msynth != NULL, return -EINVAL);
@@ -161,8 +161,8 @@
 }
 
 
-static int snd_seq_midisynth_new(seq_midisynth_t *msynth,
-				 snd_card_t *card,
+static int snd_seq_midisynth_new(struct seq_midisynth *msynth,
+				 struct snd_card *card,
 				 int device,
 				 int subdevice)
 {
@@ -175,12 +175,12 @@
 }
 
 /* open associated midi device for input */
-static int midisynth_subscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe *info)
 {
 	int err;
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
-	snd_rawmidi_runtime_t *runtime;
-	snd_rawmidi_params_t params;
+	struct seq_midisynth *msynth = private_data;
+	struct snd_rawmidi_runtime *runtime;
+	struct snd_rawmidi_params params;
 
 	/* open midi port */
 	if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_INPUT, &msynth->input_rfile)) < 0) {
@@ -203,10 +203,10 @@
 }
 
 /* close associated midi device for input */
-static int midisynth_unsubscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_unsubscribe(void *private_data, struct snd_seq_port_subscribe *info)
 {
 	int err;
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
+	struct seq_midisynth *msynth = private_data;
 
 	snd_assert(msynth->input_rfile.input != NULL, return -EINVAL);
 	err = snd_rawmidi_kernel_release(&msynth->input_rfile);
@@ -214,11 +214,11 @@
 }
 
 /* open associated midi device for output */
-static int midisynth_use(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info)
 {
 	int err;
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
-	snd_rawmidi_params_t params;
+	struct seq_midisynth *msynth = private_data;
+	struct snd_rawmidi_params params;
 
 	/* open midi port */
 	if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_OUTPUT, &msynth->output_rfile)) < 0) {
@@ -237,9 +237,9 @@
 }
 
 /* close associated midi device for output */
-static int midisynth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
+	struct seq_midisynth *msynth = private_data;
 	unsigned char buf = 0xff; /* MIDI reset */
 
 	snd_assert(msynth->output_rfile.output != NULL, return -EINVAL);
@@ -250,7 +250,7 @@
 }
 
 /* delete given midi synth port */
-static void snd_seq_midisynth_delete(seq_midisynth_t *msynth)
+static void snd_seq_midisynth_delete(struct seq_midisynth *msynth)
 {
 	if (msynth == NULL)
 		return;
@@ -265,10 +265,10 @@
 }
 
 /* set our client name */
-static int set_client_name(seq_midisynth_client_t *client, snd_card_t *card,
-			   snd_rawmidi_info_t *rmidi)
+static int set_client_name(struct seq_midisynth_client *client, struct snd_card *card,
+			   struct snd_rawmidi_info *rmidi)
 {
-	snd_seq_client_info_t cinfo;
+	struct snd_seq_client_info cinfo;
 	const char *name;
 
 	memset(&cinfo, 0, sizeof(cinfo));
@@ -281,17 +281,17 @@
 
 /* register new midi synth port */
 static int
-snd_seq_midisynth_register_port(snd_seq_device_t *dev)
+snd_seq_midisynth_register_port(struct snd_seq_device *dev)
 {
-	seq_midisynth_client_t *client;
-	seq_midisynth_t *msynth, *ms;
-	snd_seq_port_info_t *port;
-	snd_rawmidi_info_t *info;
+	struct seq_midisynth_client *client;
+	struct seq_midisynth *msynth, *ms;
+	struct snd_seq_port_info *port;
+	struct snd_rawmidi_info *info;
 	int newclient = 0;
 	unsigned int p, ports;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_port_callback_t pcallbacks;
-	snd_card_t *card = dev->card;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_port_callback pcallbacks;
+	struct snd_card *card = dev->card;
 	int device = dev->device;
 	unsigned int input_count = 0, output_count = 0;
 
@@ -342,7 +342,7 @@
 	} else if (device == 0)
 		set_client_name(client, card, info); /* use the first device's name */
 
-	msynth = kcalloc(ports, sizeof(seq_midisynth_t), GFP_KERNEL);
+	msynth = kcalloc(ports, sizeof(struct seq_midisynth), GFP_KERNEL);
 	port = kmalloc(sizeof(*port), GFP_KERNEL);
 	if (msynth == NULL || port == NULL)
 		goto __nomem;
@@ -432,11 +432,11 @@
 
 /* release midi synth port */
 static int
-snd_seq_midisynth_unregister_port(snd_seq_device_t *dev)
+snd_seq_midisynth_unregister_port(struct snd_seq_device *dev)
 {
-	seq_midisynth_client_t *client;
-	seq_midisynth_t *msynth;
-	snd_card_t *card = dev->card;
+	struct seq_midisynth_client *client;
+	struct seq_midisynth *msynth;
+	struct snd_card *card = dev->card;
 	int device = dev->device, p, ports;
 	
 	down(&register_mutex);
@@ -465,7 +465,7 @@
 
 static int __init alsa_seq_midi_init(void)
 {
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_seq_midisynth_register_port,
 		snd_seq_midisynth_unregister_port,
 	};
diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c
index 35fe8a7..d7c4fb8 100644
--- a/sound/core/seq/seq_midi_emul.c
+++ b/sound/core/seq/seq_midi_emul.c
@@ -44,17 +44,25 @@
 MODULE_LICENSE("GPL");
 
 /* Prototypes for static functions */
-static void note_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, int note, int vel);
-static void do_control(snd_midi_op_t *ops, void *private,
-		       snd_midi_channel_set_t *chset, snd_midi_channel_t *chan,
+static void note_off(struct snd_midi_op *ops, void *drv,
+		     struct snd_midi_channel *chan,
+		     int note, int vel);
+static void do_control(struct snd_midi_op *ops, void *private,
+		       struct snd_midi_channel_set *chset,
+		       struct snd_midi_channel *chan,
 		       int control, int value);
-static void rpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-static void nrpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-static void sysex(snd_midi_op_t *ops, void *private, unsigned char *sysex, int len, snd_midi_channel_set_t *chset);
-static void all_sounds_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
-static void all_notes_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
-static void snd_midi_reset_controllers(snd_midi_channel_t *chan);
-static void reset_all_channels(snd_midi_channel_set_t *chset);
+static void rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+		struct snd_midi_channel_set *chset);
+static void nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+		 struct snd_midi_channel_set *chset);
+static void sysex(struct snd_midi_op *ops, void *private, unsigned char *sysex,
+		  int len, struct snd_midi_channel_set *chset);
+static void all_sounds_off(struct snd_midi_op *ops, void *private,
+			   struct snd_midi_channel *chan);
+static void all_notes_off(struct snd_midi_op *ops, void *private,
+			  struct snd_midi_channel *chan);
+static void snd_midi_reset_controllers(struct snd_midi_channel *chan);
+static void reset_all_channels(struct snd_midi_channel_set *chset);
 
 
 /*
@@ -72,10 +80,11 @@
  *        be interpreted.
  */
 void
-snd_midi_process_event(snd_midi_op_t *ops,
-		       snd_seq_event_t *ev, snd_midi_channel_set_t *chanset)
+snd_midi_process_event(struct snd_midi_op *ops,
+		       struct snd_seq_event *ev,
+		       struct snd_midi_channel_set *chanset)
 {
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 	void *drv;
 	int dest_channel = 0;
 
@@ -89,7 +98,8 @@
 	if (snd_seq_ev_is_channel_type(ev)) {
 		dest_channel = ev->data.note.channel;
 		if (dest_channel >= chanset->max_channels) {
-			snd_printd("dest channel is %d, max is %d\n", dest_channel, chanset->max_channels);
+			snd_printd("dest channel is %d, max is %d\n",
+				   dest_channel, chanset->max_channels);
 			return;
 		}
 	}
@@ -239,7 +249,8 @@
  * release note
  */
 static void
-note_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, int note, int vel)
+note_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+	 int note, int vel)
 {
 	if (chan->gm_hold) {
 		/* Hold this note until pedal is turned off */
@@ -260,8 +271,8 @@
  * events that need to take place immediately to the driver.
  */
 static void
-do_control(snd_midi_op_t *ops, void *drv, snd_midi_channel_set_t *chset,
-	   snd_midi_channel_t *chan, int control, int value)
+do_control(struct snd_midi_op *ops, void *drv, struct snd_midi_channel_set *chset,
+	   struct snd_midi_channel *chan, int control, int value)
 {
 	int  i;
 
@@ -376,7 +387,7 @@
  * initialize the MIDI status
  */
 void
-snd_midi_channel_set_clear(snd_midi_channel_set_t *chset)
+snd_midi_channel_set_clear(struct snd_midi_channel_set *chset)
 {
 	int i;
 
@@ -384,7 +395,7 @@
 	chset->gs_master_volume = 127;
 
 	for (i = 0; i < chset->max_channels; i++) {
-		snd_midi_channel_t *chan = chset->channels + i;
+		struct snd_midi_channel *chan = chset->channels + i;
 		memset(chan->note, 0, sizeof(chan->note));
 
 		chan->midi_aftertouch = 0;
@@ -407,8 +418,8 @@
  * Process a rpn message.
  */
 static void
-rpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan,
-    snd_midi_channel_set_t *chset)
+rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+    struct snd_midi_channel_set *chset)
 {
 	int type;
 	int val;
@@ -447,8 +458,8 @@
  * Process an nrpn message.
  */
 static void
-nrpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan,
-     snd_midi_channel_set_t *chset)
+nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+     struct snd_midi_channel_set *chset)
 {
 	/* parse XG NRPNs here if possible */
 	if (ops->nrpn)
@@ -475,7 +486,8 @@
  * Process a sysex message.
  */
 static void
-sysex(snd_midi_op_t *ops, void *private, unsigned char *buf, int len, snd_midi_channel_set_t *chset)
+sysex(struct snd_midi_op *ops, void *private, unsigned char *buf, int len,
+      struct snd_midi_channel_set *chset)
 {
 	/* GM on */
 	static unsigned char gm_on_macro[] = {
@@ -588,7 +600,7 @@
  * all sound off
  */
 static void
-all_sounds_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
+all_sounds_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan)
 {
 	int n;
 
@@ -606,7 +618,7 @@
  * all notes off
  */
 static void
-all_notes_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
+all_notes_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan)
 {
 	int n;
 
@@ -621,12 +633,12 @@
 /*
  * Initialise a single midi channel control block.
  */
-static void snd_midi_channel_init(snd_midi_channel_t *p, int n)
+static void snd_midi_channel_init(struct snd_midi_channel *p, int n)
 {
 	if (p == NULL)
 		return;
 
-	memset(p, 0, sizeof(snd_midi_channel_t));
+	memset(p, 0, sizeof(struct snd_midi_channel));
 	p->private = NULL;
 	p->number = n;
 
@@ -642,12 +654,12 @@
 /*
  * Allocate and initialise a set of midi channel control blocks.
  */
-static snd_midi_channel_t *snd_midi_channel_init_set(int n)
+static struct snd_midi_channel *snd_midi_channel_init_set(int n)
 {
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 	int  i;
 
-	chan = kmalloc(n * sizeof(snd_midi_channel_t), GFP_KERNEL);
+	chan = kmalloc(n * sizeof(struct snd_midi_channel), GFP_KERNEL);
 	if (chan) {
 		for (i = 0; i < n; i++)
 			snd_midi_channel_init(chan+i, i);
@@ -660,11 +672,11 @@
  * reset all midi channels
  */
 static void
-reset_all_channels(snd_midi_channel_set_t *chset)
+reset_all_channels(struct snd_midi_channel_set *chset)
 {
 	int ch;
 	for (ch = 0; ch < chset->max_channels; ch++) {
-		snd_midi_channel_t *chan = chset->channels + ch;
+		struct snd_midi_channel *chan = chset->channels + ch;
 		snd_midi_reset_controllers(chan);
 		chan->gm_rpn_pitch_bend_range = 256; /* 2 semitones */
 		chan->gm_rpn_fine_tuning = 0;
@@ -681,9 +693,9 @@
 /*
  * Allocate and initialise a midi channel set.
  */
-snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n)
+struct snd_midi_channel_set *snd_midi_channel_alloc_set(int n)
 {
-	snd_midi_channel_set_t *chset;
+	struct snd_midi_channel_set *chset;
 
 	chset = kmalloc(sizeof(*chset), GFP_KERNEL);
 	if (chset) {
@@ -697,7 +709,7 @@
 /*
  * Reset the midi controllers on a particular channel to default values.
  */
-static void snd_midi_reset_controllers(snd_midi_channel_t *chan)
+static void snd_midi_reset_controllers(struct snd_midi_channel *chan)
 {
 	memset(chan->control, 0, sizeof(chan->control));
 	chan->gm_volume = 127;
@@ -709,7 +721,7 @@
 /*
  * Free a midi channel set.
  */
-void snd_midi_channel_free_set(snd_midi_channel_set_t *chset)
+void snd_midi_channel_free_set(struct snd_midi_channel_set *chset)
 {
 	if (chset == NULL)
 		return;
diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
index 2dc1aec..5ff80b7 100644
--- a/sound/core/seq/seq_midi_event.c
+++ b/sound/core/seq/seq_midi_event.c
@@ -41,33 +41,29 @@
 /* from 8 to 15 are events for 0xf0-0xf7 */
 
 
-/* status event types */
-typedef void (*event_encode_t)(snd_midi_event_t *dev, snd_seq_event_t *ev);
-typedef void (*event_decode_t)(snd_seq_event_t *ev, unsigned char *buf);
-
 /*
  * prototypes
  */
-static void note_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void one_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void pitchbend_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void two_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void one_param_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void songpos_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void note_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void one_param_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void pitchbend_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void two_param_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void songpos_decode(snd_seq_event_t *ev, unsigned char *buf);
+static void note_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void one_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void pitchbend_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void two_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void one_param_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void songpos_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void note_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void one_param_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void pitchbend_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void two_param_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void songpos_decode(struct snd_seq_event *ev, unsigned char *buf);
 
 /*
  * event list
  */
-static struct status_event_list_t {
+static struct status_event_list {
 	int event;
 	int qlen;
-	event_encode_t encode;
-	event_decode_t decode;
+	void (*encode)(struct snd_midi_event *dev, struct snd_seq_event *ev);
+	void (*decode)(struct snd_seq_event *ev, unsigned char *buf);
 } status_event[] = {
 	/* 0x80 - 0xf0 */
 	{SNDRV_SEQ_EVENT_NOTEOFF,	2, note_event, note_decode},
@@ -97,12 +93,15 @@
 	{SNDRV_SEQ_EVENT_RESET, 	0, NULL, NULL}, /* 0xff */
 };
 
-static int extra_decode_ctrl14(snd_midi_event_t *dev, unsigned char *buf, int len, snd_seq_event_t *ev);
-static int extra_decode_xrpn(snd_midi_event_t *dev, unsigned char *buf, int count, snd_seq_event_t *ev);
+static int extra_decode_ctrl14(struct snd_midi_event *dev, unsigned char *buf, int len,
+			       struct snd_seq_event *ev);
+static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf, int count,
+			     struct snd_seq_event *ev);
 
-static struct extra_event_list_t {
+static struct extra_event_list {
 	int event;
-	int (*decode)(snd_midi_event_t *dev, unsigned char *buf, int len, snd_seq_event_t *ev);
+	int (*decode)(struct snd_midi_event *dev, unsigned char *buf, int len,
+		      struct snd_seq_event *ev);
 } extra_event[] = {
 	{SNDRV_SEQ_EVENT_CONTROL14, extra_decode_ctrl14},
 	{SNDRV_SEQ_EVENT_NONREGPARAM, extra_decode_xrpn},
@@ -113,9 +112,9 @@
  *  new/delete record
  */
 
-int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev)
+int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev)
 {
-	snd_midi_event_t *dev;
+	struct snd_midi_event *dev;
 
 	*rdev = NULL;
 	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
@@ -135,7 +134,7 @@
 	return 0;
 }
 
-void snd_midi_event_free(snd_midi_event_t *dev)
+void snd_midi_event_free(struct snd_midi_event *dev)
 {
 	if (dev != NULL) {
 		kfree(dev->buf);
@@ -146,14 +145,14 @@
 /*
  * initialize record
  */
-static inline void reset_encode(snd_midi_event_t *dev)
+static inline void reset_encode(struct snd_midi_event *dev)
 {
 	dev->read = 0;
 	dev->qlen = 0;
 	dev->type = 0;
 }
 
-void snd_midi_event_reset_encode(snd_midi_event_t *dev)
+void snd_midi_event_reset_encode(struct snd_midi_event *dev)
 {
 	unsigned long flags;
 
@@ -162,7 +161,7 @@
 	spin_unlock_irqrestore(&dev->lock, flags);
 }
 
-void snd_midi_event_reset_decode(snd_midi_event_t *dev)
+void snd_midi_event_reset_decode(struct snd_midi_event *dev)
 {
 	unsigned long flags;
 
@@ -172,14 +171,14 @@
 }
 
 #if 0
-void snd_midi_event_init(snd_midi_event_t *dev)
+void snd_midi_event_init(struct snd_midi_event *dev)
 {
 	snd_midi_event_reset_encode(dev);
 	snd_midi_event_reset_decode(dev);
 }
 #endif  /*  0  */
 
-void snd_midi_event_no_status(snd_midi_event_t *dev, int on)
+void snd_midi_event_no_status(struct snd_midi_event *dev, int on)
 {
 	dev->nostat = on ? 1 : 0;
 }
@@ -188,7 +187,7 @@
  * resize buffer
  */
 #if 0
-int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize)
+int snd_midi_event_resize_buffer(struct snd_midi_event *dev, int bufsize)
 {
 	unsigned char *new_buf, *old_buf;
 	unsigned long flags;
@@ -213,7 +212,8 @@
  *  read bytes and encode to sequencer event if finished
  *  return the size of encoded bytes
  */
-long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev)
+long snd_midi_event_encode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev)
 {
 	long result = 0;
 	int rc;
@@ -238,7 +238,8 @@
  *         0 data is not finished
  *         negative for error
  */
-int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev)
+int snd_midi_event_encode_byte(struct snd_midi_event *dev, int c,
+			       struct snd_seq_event *ev)
 {
 	int rc = 0;
 	unsigned long flags;
@@ -303,7 +304,7 @@
 }
 
 /* encode note event */
-static void note_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void note_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.note.channel = dev->buf[0] & 0x0f;
 	ev->data.note.note = dev->buf[1];
@@ -311,21 +312,21 @@
 }
 
 /* encode one parameter controls */
-static void one_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void one_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.channel = dev->buf[0] & 0x0f;
 	ev->data.control.value = dev->buf[1];
 }
 
 /* encode pitch wheel change */
-static void pitchbend_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void pitchbend_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.channel = dev->buf[0] & 0x0f;
 	ev->data.control.value = (int)dev->buf[2] * 128 + (int)dev->buf[1] - 8192;
 }
 
 /* encode midi control change */
-static void two_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void two_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.channel = dev->buf[0] & 0x0f;
 	ev->data.control.param = dev->buf[1];
@@ -333,13 +334,13 @@
 }
 
 /* encode one parameter value*/
-static void one_param_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void one_param_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.value = dev->buf[1];
 }
 
 /* encode song position */
-static void songpos_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void songpos_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.value = (int)dev->buf[2] * 128 + (int)dev->buf[1];
 }
@@ -348,7 +349,8 @@
  * decode from a sequencer event to midi bytes
  * return the size of decoded midi events
  */
-long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev)
+long snd_midi_event_decode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev)
 {
 	unsigned int cmd, type;
 
@@ -404,20 +406,20 @@
 
 
 /* decode note event */
-static void note_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void note_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.note.note & 0x7f;
 	buf[1] = ev->data.note.velocity & 0x7f;
 }
 
 /* decode one parameter controls */
-static void one_param_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void one_param_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.control.value & 0x7f;
 }
 
 /* decode pitch wheel change */
-static void pitchbend_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void pitchbend_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	int value = ev->data.control.value + 8192;
 	buf[0] = value & 0x7f;
@@ -425,21 +427,22 @@
 }
 
 /* decode midi control change */
-static void two_param_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void two_param_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.control.param & 0x7f;
 	buf[1] = ev->data.control.value & 0x7f;
 }
 
 /* decode song position */
-static void songpos_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void songpos_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.control.value & 0x7f;
 	buf[1] = (ev->data.control.value >> 7) & 0x7f;
 }
 
 /* decode 14bit control */
-static int extra_decode_ctrl14(snd_midi_event_t *dev, unsigned char *buf, int count, snd_seq_event_t *ev)
+static int extra_decode_ctrl14(struct snd_midi_event *dev, unsigned char *buf,
+			       int count, struct snd_seq_event *ev)
 {
 	unsigned char cmd;
 	int idx = 0;
@@ -476,7 +479,8 @@
 }
 
 /* decode reg/nonreg param */
-static int extra_decode_xrpn(snd_midi_event_t *dev, unsigned char *buf, int count, snd_seq_event_t *ev)
+static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf,
+			     int count, struct snd_seq_event *ev)
 {
 	unsigned char cmd;
 	char *cbytes;
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 57ec31d..2b384fd 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -56,16 +56,17 @@
 */
 
 /* return pointer to port structure - port is locked if found */
-client_port_t *snd_seq_port_use_ptr(client_t *client, int num)
+struct snd_seq_client_port *snd_seq_port_use_ptr(struct snd_seq_client *client,
+						 int num)
 {
 	struct list_head *p;
-	client_port_t *port;
+	struct snd_seq_client_port *port;
 
 	if (client == NULL)
 		return NULL;
 	read_lock(&client->ports_lock);
 	list_for_each(p, &client->ports_list_head) {
-		port = list_entry(p, client_port_t, list);
+		port = list_entry(p, struct snd_seq_client_port, list);
 		if (port->addr.port == num) {
 			if (port->closing)
 				break; /* deleting now */
@@ -80,17 +81,18 @@
 
 
 /* search for the next port - port is locked if found */
-client_port_t *snd_seq_port_query_nearest(client_t *client, snd_seq_port_info_t *pinfo)
+struct snd_seq_client_port *snd_seq_port_query_nearest(struct snd_seq_client *client,
+						       struct snd_seq_port_info *pinfo)
 {
 	int num;
 	struct list_head *p;
-	client_port_t *port, *found;
+	struct snd_seq_client_port *port, *found;
 
 	num = pinfo->addr.port;
 	found = NULL;
 	read_lock(&client->ports_lock);
 	list_for_each(p, &client->ports_list_head) {
-		port = list_entry(p, client_port_t, list);
+		port = list_entry(p, struct snd_seq_client_port, list);
 		if (port->addr.port < num)
 			continue;
 		if (port->addr.port == num) {
@@ -111,8 +113,8 @@
 }
 
 
-/* initialize port_subs_info_t */
-static void port_subs_info_init(port_subs_info_t *grp)
+/* initialize snd_seq_port_subs_info */
+static void port_subs_info_init(struct snd_seq_port_subs_info *grp)
 {
 	INIT_LIST_HEAD(&grp->list_head);
 	grp->count = 0;
@@ -125,10 +127,11 @@
 
 
 /* create a port, port number is returned (-1 on failure) */
-client_port_t *snd_seq_create_port(client_t *client, int port)
+struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
+						int port)
 {
 	unsigned long flags;
-	client_port_t *new_port;
+	struct snd_seq_client_port *new_port;
 	struct list_head *l;
 	int num = -1;
 	
@@ -159,7 +162,7 @@
 	down(&client->ports_mutex);
 	write_lock_irqsave(&client->ports_lock, flags);
 	list_for_each(l, &client->ports_list_head) {
-		client_port_t *p = list_entry(l, client_port_t, list);
+		struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
 		if (p->addr.port > num)
 			break;
 		if (port < 0) /* auto-probe mode */
@@ -177,17 +180,24 @@
 }
 
 /* */
-enum group_type_t {
+enum group_type {
 	SRC_LIST, DEST_LIST
 };
 
-static int subscribe_port(client_t *client, client_port_t *port, port_subs_info_t *grp, snd_seq_port_subscribe_t *info, int send_ack);
-static int unsubscribe_port(client_t *client, client_port_t *port, port_subs_info_t *grp, snd_seq_port_subscribe_t *info, int send_ack);
+static int subscribe_port(struct snd_seq_client *client,
+			  struct snd_seq_client_port *port,
+			  struct snd_seq_port_subs_info *grp,
+			  struct snd_seq_port_subscribe *info, int send_ack);
+static int unsubscribe_port(struct snd_seq_client *client,
+			    struct snd_seq_client_port *port,
+			    struct snd_seq_port_subs_info *grp,
+			    struct snd_seq_port_subscribe *info, int send_ack);
 
 
-static client_port_t *get_client_port(snd_seq_addr_t *addr, client_t **cp)
+static struct snd_seq_client_port *get_client_port(struct snd_seq_addr *addr,
+						   struct snd_seq_client **cp)
 {
-	client_port_t *p;
+	struct snd_seq_client_port *p;
 	*cp = snd_seq_client_use_ptr(addr->client);
 	if (*cp) {
 		p = snd_seq_port_use_ptr(*cp, addr->port);
@@ -204,22 +214,24 @@
  * remove all subscribers on the list
  * this is called from port_delete, for each src and dest list.
  */
-static void clear_subscriber_list(client_t *client, client_port_t *port,
-				  port_subs_info_t *grp, int grptype)
+static void clear_subscriber_list(struct snd_seq_client *client,
+				  struct snd_seq_client_port *port,
+				  struct snd_seq_port_subs_info *grp,
+				  int grptype)
 {
 	struct list_head *p, *n;
 
 	down_write(&grp->list_mutex);
 	list_for_each_safe(p, n, &grp->list_head) {
-		subscribers_t *subs;
-		client_t *c;
-		client_port_t *aport;
+		struct snd_seq_subscribers *subs;
+		struct snd_seq_client *c;
+		struct snd_seq_client_port *aport;
 
 		if (grptype == SRC_LIST) {
-			subs = list_entry(p, subscribers_t, src_list);
+			subs = list_entry(p, struct snd_seq_subscribers, src_list);
 			aport = get_client_port(&subs->info.dest, &c);
 		} else {
-			subs = list_entry(p, subscribers_t, dest_list);
+			subs = list_entry(p, struct snd_seq_subscribers, dest_list);
 			aport = get_client_port(&subs->info.sender, &c);
 		}
 		list_del(p);
@@ -233,7 +245,7 @@
 				kfree(subs);
 		} else {
 			/* ok we got the connected port */
-			port_subs_info_t *agrp;
+			struct snd_seq_port_subs_info *agrp;
 			agrp = (grptype == SRC_LIST) ? &aport->c_dest : &aport->c_src;
 			down_write(&agrp->list_mutex);
 			if (grptype == SRC_LIST)
@@ -251,7 +263,8 @@
 }
 
 /* delete port data */
-static int port_delete(client_t *client, client_port_t *port)
+static int port_delete(struct snd_seq_client *client,
+		       struct snd_seq_client_port *port)
 {
 	/* set closing flag and wait for all port access are gone */
 	port->closing = 1;
@@ -273,16 +286,16 @@
 
 
 /* delete a port with the given port id */
-int snd_seq_delete_port(client_t *client, int port)
+int snd_seq_delete_port(struct snd_seq_client *client, int port)
 {
 	unsigned long flags;
 	struct list_head *l;
-	client_port_t *found = NULL;
+	struct snd_seq_client_port *found = NULL;
 
 	down(&client->ports_mutex);
 	write_lock_irqsave(&client->ports_lock, flags);
 	list_for_each(l, &client->ports_list_head) {
-		client_port_t *p = list_entry(l, client_port_t, list);
+		struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
 		if (p->addr.port == port) {
 			/* ok found.  delete from the list at first */
 			list_del(l);
@@ -300,7 +313,7 @@
 }
 
 /* delete the all ports belonging to the given client */
-int snd_seq_delete_all_ports(client_t *client)
+int snd_seq_delete_all_ports(struct snd_seq_client *client)
 {
 	unsigned long flags;
 	struct list_head deleted_list, *p, *n;
@@ -323,7 +336,7 @@
 
 	/* remove each port in deleted_list */
 	list_for_each_safe(p, n, &deleted_list) {
-		client_port_t *port = list_entry(p, client_port_t, list);
+		struct snd_seq_client_port *port = list_entry(p, struct snd_seq_client_port, list);
 		list_del(p);
 		snd_seq_system_client_ev_port_exit(port->addr.client, port->addr.port);
 		port_delete(client, port);
@@ -333,7 +346,8 @@
 }
 
 /* set port info fields */
-int snd_seq_set_port_info(client_port_t * port, snd_seq_port_info_t * info)
+int snd_seq_set_port_info(struct snd_seq_client_port * port,
+			  struct snd_seq_port_info * info)
 {
 	snd_assert(port && info, return -EINVAL);
 
@@ -361,7 +375,8 @@
 }
 
 /* get port info fields */
-int snd_seq_get_port_info(client_port_t * port, snd_seq_port_info_t * info)
+int snd_seq_get_port_info(struct snd_seq_client_port * port,
+			  struct snd_seq_port_info * info)
 {
 	snd_assert(port && info, return -EINVAL);
 
@@ -410,8 +425,11 @@
  * at each connnection/disconnection. 
  */
 
-static int subscribe_port(client_t *client, client_port_t *port, port_subs_info_t *grp,
-			  snd_seq_port_subscribe_t *info, int send_ack)
+static int subscribe_port(struct snd_seq_client *client,
+			  struct snd_seq_client_port *port,
+			  struct snd_seq_port_subs_info *grp,
+			  struct snd_seq_port_subscribe *info,
+			  int send_ack)
 {
 	int err = 0;
 
@@ -432,9 +450,11 @@
 	return err;
 }
 
-static int unsubscribe_port(client_t *client, client_port_t *port,
-			    port_subs_info_t *grp,
-			    snd_seq_port_subscribe_t *info, int send_ack)
+static int unsubscribe_port(struct snd_seq_client *client,
+			    struct snd_seq_client_port *port,
+			    struct snd_seq_port_subs_info *grp,
+			    struct snd_seq_port_subscribe *info,
+			    int send_ack)
 {
 	int err = 0;
 
@@ -453,15 +473,15 @@
 
 
 /* check if both addresses are identical */
-static inline int addr_match(snd_seq_addr_t *r, snd_seq_addr_t *s)
+static inline int addr_match(struct snd_seq_addr *r, struct snd_seq_addr *s)
 {
 	return (r->client == s->client) && (r->port == s->port);
 }
 
 /* check the two subscribe info match */
 /* if flags is zero, checks only sender and destination addresses */
-static int match_subs_info(snd_seq_port_subscribe_t *r,
-			   snd_seq_port_subscribe_t *s)
+static int match_subs_info(struct snd_seq_port_subscribe *r,
+			   struct snd_seq_port_subscribe *s)
 {
 	if (addr_match(&r->sender, &s->sender) &&
 	    addr_match(&r->dest, &s->dest)) {
@@ -475,14 +495,16 @@
 
 
 /* connect two ports */
-int snd_seq_port_connect(client_t *connector,
-			 client_t *src_client, client_port_t *src_port,
-			 client_t *dest_client, client_port_t *dest_port,
-			 snd_seq_port_subscribe_t *info)
+int snd_seq_port_connect(struct snd_seq_client *connector,
+			 struct snd_seq_client *src_client,
+			 struct snd_seq_client_port *src_port,
+			 struct snd_seq_client *dest_client,
+			 struct snd_seq_client_port *dest_port,
+			 struct snd_seq_port_subscribe *info)
 {
-	port_subs_info_t *src = &src_port->c_src;
-	port_subs_info_t *dest = &dest_port->c_dest;
-	subscribers_t *subs;
+	struct snd_seq_port_subs_info *src = &src_port->c_src;
+	struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
+	struct snd_seq_subscribers *subs;
 	struct list_head *p;
 	int err, src_called = 0;
 	unsigned long flags;
@@ -508,12 +530,12 @@
 			goto __error;
 		/* check whether already exists */
 		list_for_each(p, &src->list_head) {
-			subscribers_t *s = list_entry(p, subscribers_t, src_list);
+			struct snd_seq_subscribers *s = list_entry(p, struct snd_seq_subscribers, src_list);
 			if (match_subs_info(info, &s->info))
 				goto __error;
 		}
 		list_for_each(p, &dest->list_head) {
-			subscribers_t *s = list_entry(p, subscribers_t, dest_list);
+			struct snd_seq_subscribers *s = list_entry(p, struct snd_seq_subscribers, dest_list);
 			if (match_subs_info(info, &s->info))
 				goto __error;
 		}
@@ -554,14 +576,16 @@
 
 
 /* remove the connection */
-int snd_seq_port_disconnect(client_t *connector,
-			    client_t *src_client, client_port_t *src_port,
-			    client_t *dest_client, client_port_t *dest_port,
-			    snd_seq_port_subscribe_t *info)
+int snd_seq_port_disconnect(struct snd_seq_client *connector,
+			    struct snd_seq_client *src_client,
+			    struct snd_seq_client_port *src_port,
+			    struct snd_seq_client *dest_client,
+			    struct snd_seq_client_port *dest_port,
+			    struct snd_seq_port_subscribe *info)
 {
-	port_subs_info_t *src = &src_port->c_src;
-	port_subs_info_t *dest = &dest_port->c_dest;
-	subscribers_t *subs;
+	struct snd_seq_port_subs_info *src = &src_port->c_src;
+	struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
+	struct snd_seq_subscribers *subs;
 	struct list_head *p;
 	int err = -ENOENT;
 	unsigned long flags;
@@ -571,7 +595,7 @@
 
 	/* look for the connection */
 	list_for_each(p, &src->list_head) {
-		subs = list_entry(p, subscribers_t, src_list);
+		subs = list_entry(p, struct snd_seq_subscribers, src_list);
 		if (match_subs_info(info, &subs->info)) {
 			write_lock_irqsave(&src->list_lock, flags);
 			// write_lock(&dest->list_lock);  // no lock yet
@@ -597,15 +621,15 @@
 
 
 /* get matched subscriber */
-subscribers_t *snd_seq_port_get_subscription(port_subs_info_t *src_grp,
-					     snd_seq_addr_t *dest_addr)
+struct snd_seq_subscribers *snd_seq_port_get_subscription(struct snd_seq_port_subs_info *src_grp,
+							  struct snd_seq_addr *dest_addr)
 {
 	struct list_head *p;
-	subscribers_t *s, *found = NULL;
+	struct snd_seq_subscribers *s, *found = NULL;
 
 	down_read(&src_grp->list_mutex);
 	list_for_each(p, &src_grp->list_head) {
-		s = list_entry(p, subscribers_t, src_list);
+		s = list_entry(p, struct snd_seq_subscribers, src_list);
 		if (addr_match(dest_addr, &s->info.dest)) {
 			found = s;
 			break;
@@ -623,11 +647,11 @@
  */
 /* exported */
 int snd_seq_event_port_attach(int client,
-			      snd_seq_port_callback_t *pcbp,
+			      struct snd_seq_port_callback *pcbp,
 			      int cap, int type, int midi_channels,
 			      int midi_voices, char *portname)
 {
-	snd_seq_port_info_t portinfo;
+	struct snd_seq_port_info portinfo;
 	int  ret;
 
 	/* Set up the port */
@@ -660,7 +684,7 @@
 /* exported */
 int snd_seq_event_port_detach(int client, int port)
 {
-	snd_seq_port_info_t portinfo;
+	struct snd_seq_port_info portinfo;
 	int  err;
 
 	memset(&portinfo, 0, sizeof(portinfo));
diff --git a/sound/core/seq/seq_ports.h b/sound/core/seq/seq_ports.h
index 89fd4416..9d71171 100644
--- a/sound/core/seq/seq_ports.h
+++ b/sound/core/seq/seq_ports.h
@@ -40,37 +40,38 @@
  
 */
 
-typedef struct subscribers_t {
-	snd_seq_port_subscribe_t info;	/* additional info */
+struct snd_seq_subscribers {
+	struct snd_seq_port_subscribe info;	/* additional info */
 	struct list_head src_list;	/* link of sources */
 	struct list_head dest_list;	/* link of destinations */
 	atomic_t ref_count;
-} subscribers_t;
+};
 
-typedef struct port_subs_info_t {
+struct snd_seq_port_subs_info {
 	struct list_head list_head;	/* list of subscribed ports */
 	unsigned int count;		/* count of subscribers */
 	unsigned int exclusive: 1;	/* exclusive mode */
 	struct rw_semaphore list_mutex;
 	rwlock_t list_lock;
-	snd_seq_kernel_port_open_t *open;
-	snd_seq_kernel_port_close_t *close;
-} port_subs_info_t;
+	int (*open)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*close)(void *private_data, struct snd_seq_port_subscribe *info);
+};
 
-typedef struct client_port_t {
+struct snd_seq_client_port {
 
-	snd_seq_addr_t addr;		/* client/port number */
+	struct snd_seq_addr addr;	/* client/port number */
 	struct module *owner;		/* owner of this port */
 	char name[64];			/* port name */	
 	struct list_head list;		/* port list */
 	snd_use_lock_t use_lock;
 
 	/* subscribers */
-	port_subs_info_t c_src;		/* read (sender) list */
-	port_subs_info_t c_dest;	/* write (dest) list */
+	struct snd_seq_port_subs_info c_src;	/* read (sender) list */
+	struct snd_seq_port_subs_info c_dest;	/* write (dest) list */
 
-	snd_seq_kernel_port_input_t *event_input;
-	snd_seq_kernel_port_private_free_t *private_free;
+	int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data,
+			   int atomic, int hop);
+	void (*private_free)(void *private_data);
 	void *private_data;
 	unsigned int callback_all : 1;
 	unsigned int closing : 1;
@@ -87,42 +88,55 @@
 	int midi_voices;
 	int synth_voices;
 		
-} client_port_t;
+};
+
+struct snd_seq_client;
 
 /* return pointer to port structure and lock port */
-client_port_t *snd_seq_port_use_ptr(client_t *client, int num);
+struct snd_seq_client_port *snd_seq_port_use_ptr(struct snd_seq_client *client, int num);
 
 /* search for next port - port is locked if found */
-client_port_t *snd_seq_port_query_nearest(client_t *client, snd_seq_port_info_t *pinfo);
+struct snd_seq_client_port *snd_seq_port_query_nearest(struct snd_seq_client *client,
+						       struct snd_seq_port_info *pinfo);
 
 /* unlock the port */
 #define snd_seq_port_unlock(port) snd_use_lock_free(&(port)->use_lock)
 
 /* create a port, port number is returned (-1 on failure) */
-client_port_t *snd_seq_create_port(client_t *client, int port_index);
+struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port_index);
 
 /* delete a port */
-int snd_seq_delete_port(client_t *client, int port);
+int snd_seq_delete_port(struct snd_seq_client *client, int port);
 
 /* delete all ports */
-int snd_seq_delete_all_ports(client_t *client);
+int snd_seq_delete_all_ports(struct snd_seq_client *client);
 
 /* set port info fields */
-int snd_seq_set_port_info(client_port_t *port, snd_seq_port_info_t *info);
+int snd_seq_set_port_info(struct snd_seq_client_port *port,
+			  struct snd_seq_port_info *info);
 
 /* get port info fields */
-int snd_seq_get_port_info(client_port_t *port, snd_seq_port_info_t *info);
+int snd_seq_get_port_info(struct snd_seq_client_port *port,
+			  struct snd_seq_port_info *info);
 
 /* add subscriber to subscription list */
-int snd_seq_port_connect(client_t *caller, client_t *s, client_port_t *sp, client_t *d, client_port_t *dp, snd_seq_port_subscribe_t *info);
+int snd_seq_port_connect(struct snd_seq_client *caller,
+			 struct snd_seq_client *s, struct snd_seq_client_port *sp,
+			 struct snd_seq_client *d, struct snd_seq_client_port *dp,
+			 struct snd_seq_port_subscribe *info);
 
 /* remove subscriber from subscription list */ 
-int snd_seq_port_disconnect(client_t *caller, client_t *s, client_port_t *sp, client_t *d, client_port_t *dp, snd_seq_port_subscribe_t *info);
+int snd_seq_port_disconnect(struct snd_seq_client *caller,
+			    struct snd_seq_client *s, struct snd_seq_client_port *sp,
+			    struct snd_seq_client *d, struct snd_seq_client_port *dp,
+			    struct snd_seq_port_subscribe *info);
 
 /* subscribe port */
-int snd_seq_port_subscribe(client_port_t *port, snd_seq_port_subscribe_t *info);
+int snd_seq_port_subscribe(struct snd_seq_client_port *port,
+			   struct snd_seq_port_subscribe *info);
 
 /* get matched subscriber */
-subscribers_t *snd_seq_port_get_subscription(port_subs_info_t *src_grp, snd_seq_addr_t *dest_addr);
+struct snd_seq_subscribers *snd_seq_port_get_subscription(struct snd_seq_port_subs_info *src_grp,
+							  struct snd_seq_addr *dest_addr);
 
 #endif
diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c
index cd641bc..0744186 100644
--- a/sound/core/seq/seq_prioq.c
+++ b/sound/core/seq/seq_prioq.c
@@ -55,9 +55,9 @@
 
 
 /* create new prioq (constructor) */
-prioq_t *snd_seq_prioq_new(void)
+struct snd_seq_prioq *snd_seq_prioq_new(void)
 {
-	prioq_t *f;
+	struct snd_seq_prioq *f;
 
 	f = kzalloc(sizeof(*f), GFP_KERNEL);
 	if (f == NULL) {
@@ -74,9 +74,9 @@
 }
 
 /* delete prioq (destructor) */
-void snd_seq_prioq_delete(prioq_t **fifo)
+void snd_seq_prioq_delete(struct snd_seq_prioq **fifo)
 {
-	prioq_t *f = *fifo;
+	struct snd_seq_prioq *f = *fifo;
 	*fifo = NULL;
 
 	if (f == NULL) {
@@ -101,7 +101,8 @@
 
 /* compare timestamp between events */
 /* return 1 if a >= b; 0 */
-static inline int compare_timestamp(snd_seq_event_t * a, snd_seq_event_t * b)
+static inline int compare_timestamp(struct snd_seq_event *a,
+				    struct snd_seq_event *b)
 {
 	if ((a->flags & SNDRV_SEQ_TIME_STAMP_MASK) == SNDRV_SEQ_TIME_STAMP_TICK) {
 		/* compare ticks */
@@ -117,7 +118,8 @@
  *        zero     if a = b;
  *        positive if a > b;
  */
-static inline int compare_timestamp_rel(snd_seq_event_t *a, snd_seq_event_t *b)
+static inline int compare_timestamp_rel(struct snd_seq_event *a,
+					struct snd_seq_event *b)
 {
 	if ((a->flags & SNDRV_SEQ_TIME_STAMP_MASK) == SNDRV_SEQ_TIME_STAMP_TICK) {
 		/* compare ticks */
@@ -144,9 +146,10 @@
 }
 
 /* enqueue cell to prioq */
-int snd_seq_prioq_cell_in(prioq_t * f, snd_seq_event_cell_t * cell)
+int snd_seq_prioq_cell_in(struct snd_seq_prioq * f,
+			  struct snd_seq_event_cell * cell)
 {
-	snd_seq_event_cell_t *cur, *prev;
+	struct snd_seq_event_cell *cur, *prev;
 	unsigned long flags;
 	int count;
 	int prior;
@@ -215,9 +218,9 @@
 }
 
 /* dequeue cell from prioq */
-snd_seq_event_cell_t *snd_seq_prioq_cell_out(prioq_t * f)
+struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 
 	if (f == NULL) {
@@ -243,7 +246,7 @@
 }
 
 /* return number of events available in prioq */
-int snd_seq_prioq_avail(prioq_t * f)
+int snd_seq_prioq_avail(struct snd_seq_prioq * f)
 {
 	if (f == NULL) {
 		snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n");
@@ -254,7 +257,7 @@
 
 
 /* peek at cell at the head of the prioq */
-snd_seq_event_cell_t *snd_seq_prioq_cell_peek(prioq_t * f)
+struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f)
 {
 	if (f == NULL) {
 		snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n");
@@ -264,7 +267,8 @@
 }
 
 
-static inline int prioq_match(snd_seq_event_cell_t *cell, int client, int timestamp)
+static inline int prioq_match(struct snd_seq_event_cell *cell,
+			      int client, int timestamp)
 {
 	if (cell->event.source.client == client ||
 	    cell->event.dest.client == client)
@@ -286,12 +290,12 @@
 }
 
 /* remove cells for left client */
-void snd_seq_prioq_leave(prioq_t * f, int client, int timestamp)
+void snd_seq_prioq_leave(struct snd_seq_prioq * f, int client, int timestamp)
 {
-	register snd_seq_event_cell_t *cell, *next;
+	register struct snd_seq_event_cell *cell, *next;
 	unsigned long flags;
-	snd_seq_event_cell_t *prev = NULL;
-	snd_seq_event_cell_t *freefirst = NULL, *freeprev = NULL, *freenext;
+	struct snd_seq_event_cell *prev = NULL;
+	struct snd_seq_event_cell *freefirst = NULL, *freeprev = NULL, *freenext;
 
 	/* collect all removed cells */
 	spin_lock_irqsave(&f->lock, flags);
@@ -338,8 +342,8 @@
 	}
 }
 
-static int prioq_remove_match(snd_seq_remove_events_t *info,
-	snd_seq_event_t *ev)
+static int prioq_remove_match(struct snd_seq_remove_events *info,
+			      struct snd_seq_event *ev)
 {
 	int res;
 
@@ -394,13 +398,13 @@
 }
 
 /* remove cells matching remove criteria */
-void snd_seq_prioq_remove_events(prioq_t * f, int client,
-	snd_seq_remove_events_t *info)
+void snd_seq_prioq_remove_events(struct snd_seq_prioq * f, int client,
+				 struct snd_seq_remove_events *info)
 {
-	register snd_seq_event_cell_t *cell, *next;
+	struct snd_seq_event_cell *cell, *next;
 	unsigned long flags;
-	snd_seq_event_cell_t *prev = NULL;
-	snd_seq_event_cell_t *freefirst = NULL, *freeprev = NULL, *freenext;
+	struct snd_seq_event_cell *prev = NULL;
+	struct snd_seq_event_cell *freefirst = NULL, *freeprev = NULL, *freenext;
 
 	/* collect all removed cells */
 	spin_lock_irqsave(&f->lock, flags);
diff --git a/sound/core/seq/seq_prioq.h b/sound/core/seq/seq_prioq.h
index f12af79..d38bb78 100644
--- a/sound/core/seq/seq_prioq.h
+++ b/sound/core/seq/seq_prioq.h
@@ -26,37 +26,37 @@
 
 /* === PRIOQ === */
 
-typedef struct {
-	snd_seq_event_cell_t* head;      /* pointer to head of prioq */
-	snd_seq_event_cell_t* tail;      /* pointer to tail of prioq */
+struct snd_seq_prioq {
+	struct snd_seq_event_cell *head;      /* pointer to head of prioq */
+	struct snd_seq_event_cell *tail;      /* pointer to tail of prioq */
 	int cells;
 	spinlock_t lock;
-} prioq_t;
+};
 
 
 /* create new prioq (constructor) */
-extern prioq_t *snd_seq_prioq_new(void);
+struct snd_seq_prioq *snd_seq_prioq_new(void);
 
 /* delete prioq (destructor) */
-extern void snd_seq_prioq_delete(prioq_t **fifo);
+void snd_seq_prioq_delete(struct snd_seq_prioq **fifo);
 
 /* enqueue cell to prioq */
-extern int snd_seq_prioq_cell_in(prioq_t *f, snd_seq_event_cell_t *cell);
+int snd_seq_prioq_cell_in(struct snd_seq_prioq *f, struct snd_seq_event_cell *cell);
 
 /* dequeue cell from prioq */ 
-extern snd_seq_event_cell_t *snd_seq_prioq_cell_out(prioq_t *f);
+struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f);
 
 /* return number of events available in prioq */
-extern int snd_seq_prioq_avail(prioq_t *f);
+int snd_seq_prioq_avail(struct snd_seq_prioq *f);
 
 /* peek at cell at the head of the prioq */
-extern snd_seq_event_cell_t *snd_seq_prioq_cell_peek(prioq_t *f);
+struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq *f);
 
 /* client left queue */
-extern void snd_seq_prioq_leave(prioq_t *f, int client, int timestamp);        
+void snd_seq_prioq_leave(struct snd_seq_prioq *f, int client, int timestamp);        
 
 /* Remove events */
-void snd_seq_prioq_remove_events(prioq_t * f, int client,
-	snd_seq_remove_events_t *info);
+void snd_seq_prioq_remove_events(struct snd_seq_prioq *f, int client,
+				 struct snd_seq_remove_events *info);
 
 #endif
diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c
index 5f5c3cb..b537a71 100644
--- a/sound/core/seq/seq_queue.c
+++ b/sound/core/seq/seq_queue.c
@@ -29,7 +29,7 @@
  *  Aug. 30, 2000	Takashi Iwai
  *     - Queues are managed in static array again, but with better way.
  *       The API itself is identical.
- *     - The queue is locked when queue_t pinter is returned via
+ *     - The queue is locked when struct snd_seq_queue pointer is returned via
  *       queueptr().  This pointer *MUST* be released afterward by
  *       queuefree(ptr).
  *     - Addition of experimental sync support.
@@ -48,7 +48,7 @@
 #include "seq_info.h"
 
 /* list of allocated queues */
-static queue_t *queue_list[SNDRV_SEQ_MAX_QUEUES];
+static struct snd_seq_queue *queue_list[SNDRV_SEQ_MAX_QUEUES];
 static DEFINE_SPINLOCK(queue_list_lock);
 /* number of queues allocated */
 static int num_queues;
@@ -61,7 +61,7 @@
 /*----------------------------------------------------------------*/
 
 /* assign queue id and insert to list */
-static int queue_list_add(queue_t *q)
+static int queue_list_add(struct snd_seq_queue *q)
 {
 	int i;
 	unsigned long flags;
@@ -80,9 +80,9 @@
 	return -1;
 }
 
-static queue_t *queue_list_remove(int id, int client)
+static struct snd_seq_queue *queue_list_remove(int id, int client)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 	unsigned long flags;
 
 	spin_lock_irqsave(&queue_list_lock, flags);
@@ -107,9 +107,9 @@
 /*----------------------------------------------------------------*/
 
 /* create new queue (constructor) */
-static queue_t *queue_new(int owner, int locked)
+static struct snd_seq_queue *queue_new(int owner, int locked)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	q = kzalloc(sizeof(*q), GFP_KERNEL);
 	if (q == NULL) {
@@ -142,7 +142,7 @@
 }
 
 /* delete queue (destructor) */
-static void queue_delete(queue_t *q)
+static void queue_delete(struct snd_seq_queue *q)
 {
 	/* stop and release the timer */
 	snd_seq_timer_stop(q->timer);
@@ -187,7 +187,7 @@
  */
 int snd_seq_queue_alloc(int client, int locked, unsigned int info_flags)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	q = queue_new(client, locked);
 	if (q == NULL)
@@ -204,7 +204,7 @@
 /* delete a queue - queue must be owned by the client */
 int snd_seq_queue_delete(int client, int queueid)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	if (queueid < 0 || queueid >= SNDRV_SEQ_MAX_QUEUES)
 		return -EINVAL;
@@ -218,9 +218,9 @@
 
 
 /* return pointer to queue structure for specified id */
-queue_t *queueptr(int queueid)
+struct snd_seq_queue *queueptr(int queueid)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 	unsigned long flags;
 
 	if (queueid < 0 || queueid >= SNDRV_SEQ_MAX_QUEUES)
@@ -234,10 +234,10 @@
 }
 
 /* return the (first) queue matching with the specified name */
-queue_t *snd_seq_queue_find_name(char *name)
+struct snd_seq_queue *snd_seq_queue_find_name(char *name)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) != NULL) {
@@ -252,10 +252,10 @@
 
 /* -------------------------------------------------------- */
 
-void snd_seq_check_queue(queue_t *q, int atomic, int hop)
+void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop)
 {
 	unsigned long flags;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if (q == NULL)
 		return;
@@ -273,7 +273,8 @@
       __again:
 	/* Process tick queue... */
 	while ((cell = snd_seq_prioq_cell_peek(q->tickq)) != NULL) {
-		if (snd_seq_compare_tick_time(&q->timer->tick.cur_tick, &cell->event.time.tick)) {
+		if (snd_seq_compare_tick_time(&q->timer->tick.cur_tick,
+					      &cell->event.time.tick)) {
 			cell = snd_seq_prioq_cell_out(q->tickq);
 			if (cell)
 				snd_seq_dispatch_event(cell, atomic, hop);
@@ -286,7 +287,8 @@
 
 	/* Process time queue... */
 	while ((cell = snd_seq_prioq_cell_peek(q->timeq)) != NULL) {
-		if (snd_seq_compare_real_time(&q->timer->cur_time, &cell->event.time.time)) {
+		if (snd_seq_compare_real_time(&q->timer->cur_time,
+					      &cell->event.time.time)) {
 			cell = snd_seq_prioq_cell_out(q->timeq);
 			if (cell)
 				snd_seq_dispatch_event(cell, atomic, hop);
@@ -309,10 +311,10 @@
 
 
 /* enqueue a event to singe queue */
-int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop)
+int snd_seq_enqueue_event(struct snd_seq_event_cell *cell, int atomic, int hop)
 {
 	int dest, err;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	snd_assert(cell != NULL, return -EINVAL);
 	dest = cell->event.queue;	/* destination queue */
@@ -327,7 +329,8 @@
 			break;
 
 		case SNDRV_SEQ_TIME_STAMP_REAL:
-			snd_seq_inc_real_time(&cell->event.time.time, &q->timer->cur_time);
+			snd_seq_inc_real_time(&cell->event.time.time,
+					      &q->timer->cur_time);
 			break;
 		}
 		cell->event.flags &= ~SNDRV_SEQ_TIME_MODE_MASK;
@@ -361,7 +364,7 @@
 
 /*----------------------------------------------------------------*/
 
-static inline int check_access(queue_t *q, int client)
+static inline int check_access(struct snd_seq_queue *q, int client)
 {
 	return (q->owner == client) || (!q->locked && !q->klocked);
 }
@@ -369,7 +372,7 @@
 /* check if the client has permission to modify queue parameters.
  * if it does, lock the queue
  */
-static int queue_access_lock(queue_t *q, int client)
+static int queue_access_lock(struct snd_seq_queue *q, int client)
 {
 	unsigned long flags;
 	int access_ok;
@@ -383,7 +386,7 @@
 }
 
 /* unlock the queue */
-static inline void queue_access_unlock(queue_t *q)
+static inline void queue_access_unlock(struct snd_seq_queue *q)
 {
 	unsigned long flags;
 
@@ -395,7 +398,7 @@
 /* exported - only checking permission */
 int snd_seq_queue_check_access(int queueid, int client)
 {
-	queue_t *q = queueptr(queueid);
+	struct snd_seq_queue *q = queueptr(queueid);
 	int access_ok;
 	unsigned long flags;
 
@@ -415,7 +418,7 @@
  */
 int snd_seq_queue_set_owner(int queueid, int client, int locked)
 {
-	queue_t *q = queueptr(queueid);
+	struct snd_seq_queue *q = queueptr(queueid);
 
 	if (q == NULL)
 		return -EINVAL;
@@ -443,8 +446,8 @@
 int snd_seq_queue_timer_open(int queueid)
 {
 	int result = 0;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	queue = queueptr(queueid);
 	if (queue == NULL)
@@ -463,8 +466,8 @@
  */
 int snd_seq_queue_timer_close(int queueid)
 {
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 	int result = 0;
 
 	queue = queueptr(queueid);
@@ -477,9 +480,10 @@
 }
 
 /* change queue tempo and ppq */
-int snd_seq_queue_timer_set_tempo(int queueid, int client, snd_seq_queue_tempo_t *info)
+int snd_seq_queue_timer_set_tempo(int queueid, int client,
+				  struct snd_seq_queue_tempo *info)
 {
-	queue_t *q = queueptr(queueid);
+	struct snd_seq_queue *q = queueptr(queueid);
 	int result;
 
 	if (q == NULL)
@@ -493,7 +497,8 @@
 	if (result >= 0)
 		result = snd_seq_timer_set_ppq(q->timer, info->ppq);
 	if (result >= 0 && info->skew_base > 0)
-		result = snd_seq_timer_set_skew(q->timer, info->skew_value, info->skew_base);
+		result = snd_seq_timer_set_skew(q->timer, info->skew_value,
+						info->skew_base);
 	queue_access_unlock(q);
 	queuefree(q);
 	return result;
@@ -506,7 +511,7 @@
  */
 int snd_seq_queue_use(int queueid, int client, int use)
 {
-	queue_t *queue;
+	struct snd_seq_queue *queue;
 
 	queue = queueptr(queueid);
 	if (queue == NULL)
@@ -538,7 +543,7 @@
  */
 int snd_seq_queue_is_used(int queueid, int client)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 	int result;
 
 	q = queueptr(queueid);
@@ -559,7 +564,7 @@
 {
 	unsigned long flags;
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
@@ -584,7 +589,7 @@
 void snd_seq_queue_client_leave(int client)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	/* delete own queues from queue list */
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
@@ -615,7 +620,7 @@
 void snd_seq_queue_client_leave_cells(int client)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
@@ -627,10 +632,10 @@
 }
 
 /* remove cells based on flush criteria */
-void snd_seq_queue_remove_cells(int client, snd_seq_remove_events_t *info)
+void snd_seq_queue_remove_cells(int client, struct snd_seq_remove_events *info)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
@@ -650,9 +655,10 @@
 /*
  * send events to all subscribed ports
  */
-static void queue_broadcast_event(queue_t *q, snd_seq_event_t *ev, int atomic, int hop)
+static void queue_broadcast_event(struct snd_seq_queue *q, struct snd_seq_event *ev,
+				  int atomic, int hop)
 {
-	snd_seq_event_t sev;
+	struct snd_seq_event sev;
 
 	sev = *ev;
 	
@@ -672,7 +678,8 @@
  * process a received queue-control event.
  * this function is exported for seq_sync.c.
  */
-static void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev,
+static void snd_seq_queue_process_event(struct snd_seq_queue *q,
+					struct snd_seq_event *ev,
 					int atomic, int hop)
 {
 	switch (ev->type) {
@@ -724,9 +731,9 @@
  * Queue control via timer control port:
  * this function is exported as a callback of timer port.
  */
-int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop)
+int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	snd_assert(ev != NULL, return -EINVAL);
 	q = queueptr(ev->data.queue.queue);
@@ -750,12 +757,12 @@
 /*----------------------------------------------------------------*/
 
 /* exported to seq_info.c */
-void snd_seq_info_queues_read(snd_info_entry_t *entry, 
-			      snd_info_buffer_t * buffer)
+void snd_seq_info_queues_read(struct snd_info_entry *entry, 
+			      struct snd_info_buffer *buffer)
 {
 	int i, bpm;
-	queue_t *q;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *q;
+	struct snd_seq_timer *tmr;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
diff --git a/sound/core/seq/seq_queue.h b/sound/core/seq/seq_queue.h
index ea3c542..8884385 100644
--- a/sound/core/seq/seq_queue.h
+++ b/sound/core/seq/seq_queue.h
@@ -30,15 +30,15 @@
 
 #define SEQ_QUEUE_NO_OWNER (-1)
 
-struct _snd_seq_queue {
+struct snd_seq_queue {
 	int queue;		/* queue number */
 
 	char name[64];		/* name of this queue */
 
-	prioq_t	*tickq;		/* midi tick event queue */
-	prioq_t	*timeq;		/* real-time event queue */	
+	struct snd_seq_prioq	*tickq;		/* midi tick event queue */
+	struct snd_seq_prioq	*timeq;		/* real-time event queue */	
 	
-	seq_timer_t *timer;	/* time keeper for this queue */
+	struct snd_seq_timer *timer;	/* time keeper for this queue */
 	int	owner;		/* client that 'owns' the timer */
 	unsigned int	locked:1,	/* timer is only accesibble by owner if set */
 		klocked:1,	/* kernel lock (after START) */	
@@ -83,26 +83,26 @@
 void snd_seq_queue_client_leave(int client);
 
 /* enqueue a event received from one the clients */
-int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop);
+int snd_seq_enqueue_event(struct snd_seq_event_cell *cell, int atomic, int hop);
 
 /* Remove events */
 void snd_seq_queue_client_leave_cells(int client);
-void snd_seq_queue_remove_cells(int client, snd_seq_remove_events_t *info);
+void snd_seq_queue_remove_cells(int client, struct snd_seq_remove_events *info);
 
 /* return pointer to queue structure for specified id */
-queue_t *queueptr(int queueid);
+struct snd_seq_queue *queueptr(int queueid);
 /* unlock */
 #define queuefree(q) snd_use_lock_free(&(q)->use_lock)
 
 /* return the (first) queue matching with the specified name */
-queue_t *snd_seq_queue_find_name(char *name);
+struct snd_seq_queue *snd_seq_queue_find_name(char *name);
 
 /* check single queue and dispatch events */
-void snd_seq_check_queue(queue_t *q, int atomic, int hop);
+void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop);
 
 /* access to queue's parameters */
 int snd_seq_queue_check_access(int queueid, int client);
-int snd_seq_queue_timer_set_tempo(int queueid, int client, snd_seq_queue_tempo_t *info);
+int snd_seq_queue_timer_set_tempo(int queueid, int client, struct snd_seq_queue_tempo *info);
 int snd_seq_queue_set_owner(int queueid, int client, int locked);
 int snd_seq_queue_set_locked(int queueid, int client, int locked);
 int snd_seq_queue_timer_open(int queueid);
@@ -110,7 +110,7 @@
 int snd_seq_queue_use(int queueid, int client, int use);
 int snd_seq_queue_is_used(int queueid, int client);
 
-int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop);
+int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop);
 
 /*
  * 64bit division - for sync stuff..
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
index 0d9eff8..86b1cba 100644
--- a/sound/core/seq/seq_system.c
+++ b/sound/core/seq/seq_system.c
@@ -66,12 +66,12 @@
 
 
 /* fill standard header data, source port & channel are filled in */
-static int setheader(snd_seq_event_t * ev, int client, int port)
+static int setheader(struct snd_seq_event * ev, int client, int port)
 {
 	if (announce_port < 0)
 		return -ENODEV;
 
-	memset(ev, 0, sizeof(snd_seq_event_t));
+	memset(ev, 0, sizeof(struct snd_seq_event));
 
 	ev->flags &= ~SNDRV_SEQ_EVENT_LENGTH_MASK;
 	ev->flags |= SNDRV_SEQ_EVENT_LENGTH_FIXED;
@@ -92,7 +92,7 @@
 /* entry points for broadcasting system events */
 void snd_seq_system_broadcast(int client, int port, int type)
 {
-	snd_seq_event_t ev;
+	struct snd_seq_event ev;
 	
 	if (setheader(&ev, client, port) < 0)
 		return;
@@ -101,7 +101,7 @@
 }
 
 /* entry points for broadcasting system events */
-int snd_seq_system_notify(int client, int port, snd_seq_event_t *ev)
+int snd_seq_system_notify(int client, int port, struct snd_seq_event *ev)
 {
 	ev->flags = SNDRV_SEQ_EVENT_LENGTH_FIXED;
 	ev->source.client = sysclient;
@@ -112,7 +112,7 @@
 }
 
 /* call-back handler for timer events */
-static int event_input_timer(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop)
+static int event_input_timer(struct snd_seq_event * ev, int direct, void *private_data, int atomic, int hop)
 {
 	return snd_seq_control_queue(ev, atomic, hop);
 }
@@ -121,10 +121,10 @@
 int __init snd_seq_system_client_init(void)
 {
 
-	snd_seq_client_callback_t callbacks;
-	snd_seq_port_callback_t pcallbacks;
-	snd_seq_client_info_t *inf;
-	snd_seq_port_info_t *port;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_port_callback pcallbacks;
+	struct snd_seq_client_info *inf;
+	struct snd_seq_port_info *port;
 
 	inf = kzalloc(sizeof(*inf), GFP_KERNEL);
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
diff --git a/sound/core/seq/seq_system.h b/sound/core/seq/seq_system.h
index 9000072..cf2cfa2 100644
--- a/sound/core/seq/seq_system.h
+++ b/sound/core/seq/seq_system.h
@@ -34,7 +34,7 @@
 #define snd_seq_system_client_ev_port_exit(client, port) snd_seq_system_broadcast(client, port, SNDRV_SEQ_EVENT_PORT_EXIT)
 #define snd_seq_system_client_ev_port_change(client, port) snd_seq_system_broadcast(client, port, SNDRV_SEQ_EVENT_PORT_CHANGE)
 
-int snd_seq_system_notify(int client, int port, snd_seq_event_t *ev);
+int snd_seq_system_notify(int client, int port, struct snd_seq_event *ev);
 
 /* register our internal client */
 int snd_seq_system_client_init(void);
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
index 65b64a7..a1d8bfd 100644
--- a/sound/core/seq/seq_timer.c
+++ b/sound/core/seq/seq_timer.c
@@ -41,7 +41,7 @@
 
 #define SKEW_BASE	0x10000	/* 16bit shift */
 
-static void snd_seq_timer_set_tick_resolution(seq_timer_tick_t *tick,
+static void snd_seq_timer_set_tick_resolution(struct snd_seq_timer_tick *tick,
 					      int tempo, int ppq)
 {
 	if (tempo < 1000000)
@@ -60,9 +60,9 @@
 }
 
 /* create new timer (constructor) */
-seq_timer_t *snd_seq_timer_new(void)
+struct snd_seq_timer *snd_seq_timer_new(void)
 {
-	seq_timer_t *tmr;
+	struct snd_seq_timer *tmr;
 	
 	tmr = kzalloc(sizeof(*tmr), GFP_KERNEL);
 	if (tmr == NULL) {
@@ -81,9 +81,9 @@
 }
 
 /* delete timer (destructor) */
-void snd_seq_timer_delete(seq_timer_t **tmr)
+void snd_seq_timer_delete(struct snd_seq_timer **tmr)
 {
-	seq_timer_t *t = *tmr;
+	struct snd_seq_timer *t = *tmr;
 	*tmr = NULL;
 
 	if (t == NULL) {
@@ -99,7 +99,7 @@
 	kfree(t);
 }
 
-void snd_seq_timer_defaults(seq_timer_t * tmr)
+void snd_seq_timer_defaults(struct snd_seq_timer * tmr)
 {
 	/* setup defaults */
 	tmr->ppq = 96;		/* 96 PPQ */
@@ -118,7 +118,7 @@
 	tmr->skew = tmr->skew_base = SKEW_BASE;
 }
 
-void snd_seq_timer_reset(seq_timer_t * tmr)
+void snd_seq_timer_reset(struct snd_seq_timer * tmr)
 {
 	unsigned long flags;
 
@@ -136,13 +136,13 @@
 
 
 /* called by timer interrupt routine. the period time since previous invocation is passed */
-static void snd_seq_timer_interrupt(snd_timer_instance_t *timeri,
+static void snd_seq_timer_interrupt(struct snd_timer_instance *timeri,
 				    unsigned long resolution,
 				    unsigned long ticks)
 {
 	unsigned long flags;
-	queue_t *q = (queue_t *)timeri->callback_data;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *q = timeri->callback_data;
+	struct snd_seq_timer *tmr;
 
 	if (q == NULL)
 		return;
@@ -177,7 +177,7 @@
 }
 
 /* set current tempo */
-int snd_seq_timer_set_tempo(seq_timer_t * tmr, int tempo)
+int snd_seq_timer_set_tempo(struct snd_seq_timer * tmr, int tempo)
 {
 	unsigned long flags;
 
@@ -194,7 +194,7 @@
 }
 
 /* set current ppq */
-int snd_seq_timer_set_ppq(seq_timer_t * tmr, int ppq)
+int snd_seq_timer_set_ppq(struct snd_seq_timer * tmr, int ppq)
 {
 	unsigned long flags;
 
@@ -217,7 +217,8 @@
 }
 
 /* set current tick position */
-int snd_seq_timer_set_position_tick(seq_timer_t *tmr, snd_seq_tick_time_t position)
+int snd_seq_timer_set_position_tick(struct snd_seq_timer *tmr,
+				    snd_seq_tick_time_t position)
 {
 	unsigned long flags;
 
@@ -231,7 +232,8 @@
 }
 
 /* set current real-time position */
-int snd_seq_timer_set_position_time(seq_timer_t *tmr, snd_seq_real_time_t position)
+int snd_seq_timer_set_position_time(struct snd_seq_timer *tmr,
+				    snd_seq_real_time_t position)
 {
 	unsigned long flags;
 
@@ -245,7 +247,8 @@
 }
 
 /* set timer skew */
-int snd_seq_timer_set_skew(seq_timer_t *tmr, unsigned int skew, unsigned int base)
+int snd_seq_timer_set_skew(struct snd_seq_timer *tmr, unsigned int skew,
+			   unsigned int base)
 {
 	unsigned long flags;
 
@@ -262,10 +265,10 @@
 	return 0;
 }
 
-int snd_seq_timer_open(queue_t *q)
+int snd_seq_timer_open(struct snd_seq_queue *q)
 {
-	snd_timer_instance_t *t;
-	seq_timer_t *tmr;
+	struct snd_timer_instance *t;
+	struct snd_seq_timer *tmr;
 	char str[32];
 	int err;
 
@@ -282,7 +285,7 @@
 	if (err < 0 && tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_SLAVE) {
 		if (tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_GLOBAL ||
 		    tmr->alsa_id.device != SNDRV_TIMER_GLOBAL_SYSTEM) {
-			snd_timer_id_t tid;
+			struct snd_timer_id tid;
 			memset(&tid, 0, sizeof(tid));
 			tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
 			tid.dev_sclass = SNDRV_TIMER_SCLASS_SEQUENCER;
@@ -302,9 +305,9 @@
 	return 0;
 }
 
-int snd_seq_timer_close(queue_t *q)
+int snd_seq_timer_close(struct snd_seq_queue *q)
 {
-	seq_timer_t *tmr;
+	struct snd_seq_timer *tmr;
 	
 	tmr = q->timer;
 	snd_assert(tmr != NULL, return -EINVAL);
@@ -316,7 +319,7 @@
 	return 0;
 }
 
-int snd_seq_timer_stop(seq_timer_t * tmr)
+int snd_seq_timer_stop(struct snd_seq_timer * tmr)
 {
 	if (! tmr->timeri)
 		return -EINVAL;
@@ -327,9 +330,9 @@
 	return 0;
 }
 
-static int initialize_timer(seq_timer_t *tmr)
+static int initialize_timer(struct snd_seq_timer *tmr)
 {
-	snd_timer_t *t;
+	struct snd_timer *t;
 	unsigned long freq;
 
 	t = tmr->timeri->timer;
@@ -358,7 +361,7 @@
 	return 0;
 }
 
-int snd_seq_timer_start(seq_timer_t * tmr)
+int snd_seq_timer_start(struct snd_seq_timer * tmr)
 {
 	if (! tmr->timeri)
 		return -EINVAL;
@@ -373,7 +376,7 @@
 	return 0;
 }
 
-int snd_seq_timer_continue(seq_timer_t * tmr)
+int snd_seq_timer_continue(struct snd_seq_timer * tmr)
 {
 	if (! tmr->timeri)
 		return -EINVAL;
@@ -391,7 +394,7 @@
 }
 
 /* return current 'real' time. use timeofday() to get better granularity. */
-snd_seq_real_time_t snd_seq_timer_get_cur_time(seq_timer_t *tmr)
+snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr)
 {
 	snd_seq_real_time_t cur_time;
 
@@ -416,19 +419,20 @@
 
 /* TODO: use interpolation on tick queue (will only be useful for very
  high PPQ values) */
-snd_seq_tick_time_t snd_seq_timer_get_cur_tick(seq_timer_t *tmr)
+snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr)
 {
 	return tmr->tick.cur_tick;
 }
 
 
 /* exported to seq_info.c */
-void snd_seq_info_timer_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+void snd_seq_info_timer_read(struct snd_info_entry *entry,
+			     struct snd_info_buffer *buffer)
 {
 	int idx;
-	queue_t *q;
-	seq_timer_t *tmr;
-	snd_timer_instance_t *ti;
+	struct snd_seq_queue *q;
+	struct snd_seq_timer *tmr;
+	struct snd_timer_instance *ti;
 	unsigned long resolution;
 	
 	for (idx = 0; idx < SNDRV_SEQ_MAX_QUEUES; idx++) {
diff --git a/sound/core/seq/seq_timer.h b/sound/core/seq/seq_timer.h
index 287ed68..e9ee154 100644
--- a/sound/core/seq/seq_timer.h
+++ b/sound/core/seq/seq_timer.h
@@ -24,13 +24,13 @@
 #include <sound/timer.h>
 #include <sound/seq_kernel.h>
 
-typedef struct {
+struct snd_seq_timer_tick {
 	snd_seq_tick_time_t	cur_tick;	/* current tick */
 	unsigned long		resolution;	/* time per tick in nsec */
 	unsigned long		fraction;	/* current time per tick in nsec */
-} seq_timer_tick_t;
+};
 
-typedef struct {
+struct snd_seq_timer {
 	/* ... tempo / offset / running state */
 
 	unsigned int		running:1,	/* running state of queue */	
@@ -40,12 +40,12 @@
 	int			ppq;		/* time resolution, ticks/quarter */
 
 	snd_seq_real_time_t	cur_time;	/* current time */
-	seq_timer_tick_t	tick;		/* current tick */
+	struct snd_seq_timer_tick	tick;	/* current tick */
 	int tick_updated;
 	
 	int			type;		/* timer type */
-	snd_timer_id_t		alsa_id;	/* ALSA's timer ID */
-	snd_timer_instance_t	*timeri;	/* timer instance */
+	struct snd_timer_id	alsa_id;	/* ALSA's timer ID */
+	struct snd_timer_instance	*timeri;	/* timer instance */
 	unsigned int		ticks;
 	unsigned long		preferred_resolution; /* timer resolution, ticks/sec */
 
@@ -55,17 +55,18 @@
 	struct timeval 		last_update;	 /* time of last clock update, used for interpolation */
 
 	spinlock_t lock;
-} seq_timer_t;
+};
 
 
 /* create new timer (constructor) */
-extern seq_timer_t *snd_seq_timer_new(void);
+struct snd_seq_timer *snd_seq_timer_new(void);
 
 /* delete timer (destructor) */
-extern void snd_seq_timer_delete(seq_timer_t **tmr);
+void snd_seq_timer_delete(struct snd_seq_timer **tmr);
 
 /* */
-static inline void snd_seq_timer_update_tick(seq_timer_tick_t *tick, unsigned long resolution)
+static inline void snd_seq_timer_update_tick(struct snd_seq_timer_tick *tick,
+					     unsigned long resolution)
 {
 	if (tick->resolution > 0) {
 		tick->fraction += resolution;
@@ -119,21 +120,22 @@
 }
 
 /* called by timer isr */
-int snd_seq_timer_open(queue_t *q);
-int snd_seq_timer_close(queue_t *q);
-int snd_seq_timer_midi_open(queue_t *q);
-int snd_seq_timer_midi_close(queue_t *q);
-void snd_seq_timer_defaults(seq_timer_t *tmr);
-void snd_seq_timer_reset(seq_timer_t *tmr);
-int snd_seq_timer_stop(seq_timer_t *tmr);
-int snd_seq_timer_start(seq_timer_t *tmr);
-int snd_seq_timer_continue(seq_timer_t *tmr);
-int snd_seq_timer_set_tempo(seq_timer_t *tmr, int tempo);
-int snd_seq_timer_set_ppq(seq_timer_t *tmr, int ppq);
-int snd_seq_timer_set_position_tick(seq_timer_t *tmr, snd_seq_tick_time_t position);
-int snd_seq_timer_set_position_time(seq_timer_t *tmr, snd_seq_real_time_t position);
-int snd_seq_timer_set_skew(seq_timer_t *tmr, unsigned int skew, unsigned int base);
-snd_seq_real_time_t snd_seq_timer_get_cur_time(seq_timer_t *tmr);
-snd_seq_tick_time_t snd_seq_timer_get_cur_tick(seq_timer_t *tmr);
+struct snd_seq_queue;
+int snd_seq_timer_open(struct snd_seq_queue *q);
+int snd_seq_timer_close(struct snd_seq_queue *q);
+int snd_seq_timer_midi_open(struct snd_seq_queue *q);
+int snd_seq_timer_midi_close(struct snd_seq_queue *q);
+void snd_seq_timer_defaults(struct snd_seq_timer *tmr);
+void snd_seq_timer_reset(struct snd_seq_timer *tmr);
+int snd_seq_timer_stop(struct snd_seq_timer *tmr);
+int snd_seq_timer_start(struct snd_seq_timer *tmr);
+int snd_seq_timer_continue(struct snd_seq_timer *tmr);
+int snd_seq_timer_set_tempo(struct snd_seq_timer *tmr, int tempo);
+int snd_seq_timer_set_ppq(struct snd_seq_timer *tmr, int ppq);
+int snd_seq_timer_set_position_tick(struct snd_seq_timer *tmr, snd_seq_tick_time_t position);
+int snd_seq_timer_set_position_time(struct snd_seq_timer *tmr, snd_seq_real_time_t position);
+int snd_seq_timer_set_skew(struct snd_seq_timer *tmr, unsigned int skew, unsigned int base);
+snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr);
+snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr);
 
 #endif
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index e4f512a..ea21139 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -56,7 +56,8 @@
 /*
  * initialize an event record
  */
-static void snd_virmidi_init_event(snd_virmidi_t *vmidi, snd_seq_event_t *ev)
+static void snd_virmidi_init_event(struct snd_virmidi *vmidi,
+				   struct snd_seq_event *ev)
 {
 	memset(ev, 0, sizeof(*ev));
 	ev->source.port = vmidi->port;
@@ -76,16 +77,17 @@
 /*
  * decode input event and put to read buffer of each opened file
  */
-static int snd_virmidi_dev_receive_event(snd_virmidi_dev_t *rdev, snd_seq_event_t *ev)
+static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,
+					 struct snd_seq_event *ev)
 {
-	snd_virmidi_t *vmidi;
+	struct snd_virmidi *vmidi;
 	struct list_head *list;
 	unsigned char msg[4];
 	int len;
 
 	read_lock(&rdev->filelist_lock);
 	list_for_each(list, &rdev->filelist) {
-		vmidi = list_entry(list, snd_virmidi_t, list);
+		vmidi = list_entry(list, struct snd_virmidi, list);
 		if (!vmidi->trigger)
 			continue;
 		if (ev->type == SNDRV_SEQ_EVENT_SYSEX) {
@@ -111,9 +113,9 @@
  * SNDRV_VIRMIDI_SEQ_ATTACH.
  */
 #if 0
-int snd_virmidi_receive(snd_rawmidi_t *rmidi, snd_seq_event_t *ev)
+int snd_virmidi_receive(struct snd_rawmidi *rmidi, struct snd_seq_event *ev)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = rmidi->private_data;
 	return snd_virmidi_dev_receive_event(rdev, ev);
@@ -123,10 +125,10 @@
 /*
  * event handler of virmidi port
  */
-static int snd_virmidi_event_input(snd_seq_event_t *ev, int direct,
+static int snd_virmidi_event_input(struct snd_seq_event *ev, int direct,
 				   void *private_data, int atomic, int hop)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	if (!(rdev->flags & SNDRV_VIRMIDI_USE))
@@ -137,9 +139,9 @@
 /*
  * trigger rawmidi stream for input
  */
-static void snd_virmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_virmidi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 
 	if (up) {
 		vmidi->trigger = 1;
@@ -151,9 +153,9 @@
 /*
  * trigger rawmidi stream for output
  */
-static void snd_virmidi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 	int count, res;
 	unsigned char buf[32], *pbuf;
 
@@ -198,11 +200,11 @@
 /*
  * open rawmidi handle for input
  */
-static int snd_virmidi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_input_open(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_dev_t *rdev = substream->rmidi->private_data;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
-	snd_virmidi_t *vmidi;
+	struct snd_virmidi_dev *rdev = substream->rmidi->private_data;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
+	struct snd_virmidi *vmidi;
 	unsigned long flags;
 
 	vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
@@ -227,11 +229,11 @@
 /*
  * open rawmidi handle for output
  */
-static int snd_virmidi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_output_open(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_dev_t *rdev = substream->rmidi->private_data;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
-	snd_virmidi_t *vmidi;
+	struct snd_virmidi_dev *rdev = substream->rmidi->private_data;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
+	struct snd_virmidi *vmidi;
 
 	vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
 	if (vmidi == NULL)
@@ -253,9 +255,9 @@
 /*
  * close rawmidi handle for input
  */
-static int snd_virmidi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_input_close(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 	snd_midi_event_free(vmidi->parser);
 	list_del(&vmidi->list);
 	substream->runtime->private_data = NULL;
@@ -266,9 +268,9 @@
 /*
  * close rawmidi handle for output
  */
-static int snd_virmidi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_output_close(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 	snd_midi_event_free(vmidi->parser);
 	substream->runtime->private_data = NULL;
 	kfree(vmidi);
@@ -278,9 +280,10 @@
 /*
  * subscribe callback - allow output to rawmidi device
  */
-static int snd_virmidi_subscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_subscribe(void *private_data,
+				 struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	if (!try_module_get(rdev->card->module))
@@ -292,9 +295,10 @@
 /*
  * unsubscribe callback - disallow output to rawmidi device
  */
-static int snd_virmidi_unsubscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_unsubscribe(void *private_data,
+				   struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	rdev->flags &= ~SNDRV_VIRMIDI_SUBSCRIBE;
@@ -306,9 +310,10 @@
 /*
  * use callback - allow input to rawmidi device
  */
-static int snd_virmidi_use(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_use(void *private_data,
+			   struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	if (!try_module_get(rdev->card->module))
@@ -320,9 +325,10 @@
 /*
  * unuse callback - disallow input to rawmidi device
  */
-static int snd_virmidi_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_unuse(void *private_data,
+			     struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	rdev->flags &= ~SNDRV_VIRMIDI_USE;
@@ -335,13 +341,13 @@
  *  Register functions
  */
 
-static snd_rawmidi_ops_t snd_virmidi_input_ops = {
+static struct snd_rawmidi_ops snd_virmidi_input_ops = {
 	.open = snd_virmidi_input_open,
 	.close = snd_virmidi_input_close,
 	.trigger = snd_virmidi_input_trigger,
 };
 
-static snd_rawmidi_ops_t snd_virmidi_output_ops = {
+static struct snd_rawmidi_ops snd_virmidi_output_ops = {
 	.open = snd_virmidi_output_open,
 	.close = snd_virmidi_output_close,
 	.trigger = snd_virmidi_output_trigger,
@@ -350,13 +356,13 @@
 /*
  * create a sequencer client and a port
  */
-static int snd_virmidi_dev_attach_seq(snd_virmidi_dev_t *rdev)
+static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
 {
 	int client;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_port_callback_t pcallbacks;
-	snd_seq_client_info_t *info;
-	snd_seq_port_info_t *pinfo;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_port_callback pcallbacks;
+	struct snd_seq_client_info *info;
+	struct snd_seq_port_info *pinfo;
 	int err;
 
 	if (rdev->client >= 0)
@@ -426,7 +432,7 @@
 /*
  * release the sequencer client
  */
-static void snd_virmidi_dev_detach_seq(snd_virmidi_dev_t *rdev)
+static void snd_virmidi_dev_detach_seq(struct snd_virmidi_dev *rdev)
 {
 	if (rdev->client >= 0) {
 		snd_seq_delete_kernel_client(rdev->client);
@@ -437,9 +443,9 @@
 /*
  * register the device
  */
-static int snd_virmidi_dev_register(snd_rawmidi_t *rmidi)
+static int snd_virmidi_dev_register(struct snd_rawmidi *rmidi)
 {
-	snd_virmidi_dev_t *rdev = rmidi->private_data;
+	struct snd_virmidi_dev *rdev = rmidi->private_data;
 	int err;
 
 	switch (rdev->seq_mode) {
@@ -464,9 +470,9 @@
 /*
  * unregister the device
  */
-static int snd_virmidi_dev_unregister(snd_rawmidi_t *rmidi)
+static int snd_virmidi_dev_unregister(struct snd_rawmidi *rmidi)
 {
-	snd_virmidi_dev_t *rdev = rmidi->private_data;
+	struct snd_virmidi_dev *rdev = rmidi->private_data;
 
 	if (rdev->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH)
 		snd_virmidi_dev_detach_seq(rdev);
@@ -476,7 +482,7 @@
 /*
  *
  */
-static snd_rawmidi_global_ops_t snd_virmidi_global_ops = {
+static struct snd_rawmidi_global_ops snd_virmidi_global_ops = {
 	.dev_register = snd_virmidi_dev_register,
 	.dev_unregister = snd_virmidi_dev_unregister,
 };
@@ -484,9 +490,9 @@
 /*
  * free device
  */
-static void snd_virmidi_free(snd_rawmidi_t *rmidi)
+static void snd_virmidi_free(struct snd_rawmidi *rmidi)
 {
-	snd_virmidi_dev_t *rdev = rmidi->private_data;
+	struct snd_virmidi_dev *rdev = rmidi->private_data;
 	kfree(rdev);
 }
 
@@ -495,10 +501,10 @@
  *
  */
 /* exported */
-int snd_virmidi_new(snd_card_t *card, int device, snd_rawmidi_t **rrmidi)
+int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmidi)
 {
-	snd_rawmidi_t *rmidi;
-	snd_virmidi_dev_t *rdev;
+	struct snd_rawmidi *rmidi;
+	struct snd_virmidi_dev *rdev;
 	int err;
 	
 	*rrmidi = NULL;
