diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index 8ccd33f..f5a832f 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -25,15 +25,15 @@
 
 /* Prototypes for static functions */
 static void free_port(void *private);
-static void snd_emux_init_port(snd_emux_port_t *p);
-static int snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info);
-static int snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info);
-static int get_client(snd_card_t *card, int index, char *name);
+static void snd_emux_init_port(struct snd_emux_port *p);
+static int snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info);
+static int snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info);
+static int get_client(struct snd_card *card, int index, char *name);
 
 /*
  * MIDI emulation operators
  */
-static snd_midi_op_t emux_ops = {
+static struct snd_midi_op emux_ops = {
 	snd_emux_note_on,
 	snd_emux_note_off,
 	snd_emux_key_press,
@@ -65,10 +65,10 @@
  * can connect to these ports to play midi data.
  */
 int
-snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index)
+snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
 {
 	int  i;
-	snd_seq_port_callback_t pinfo;
+	struct snd_seq_port_callback pinfo;
 	char tmpname[64];
 
 	sprintf(tmpname, "%s WaveTable", emu->name);
@@ -94,7 +94,7 @@
 	pinfo.event_input = snd_emux_event_input;
 
 	for (i = 0; i < emu->num_ports; i++) {
-		snd_emux_port_t *p;
+		struct snd_emux_port *p;
 
 		sprintf(tmpname, "%s Port %d", emu->name, i);
 		p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS,
@@ -119,7 +119,7 @@
  * destroy the kernel client.
  */
 void
-snd_emux_detach_seq(snd_emux_t *emu)
+snd_emux_detach_seq(struct snd_emux *emu)
 {
 	if (emu->voices)
 		snd_emux_terminate_all(emu);
@@ -137,12 +137,12 @@
  * create a sequencer port and channel_set
  */
 
-snd_emux_port_t *
-snd_emux_create_port(snd_emux_t *emu, char *name,
-			int max_channels, int oss_port,
-			snd_seq_port_callback_t *callback)
+struct snd_emux_port *
+snd_emux_create_port(struct snd_emux *emu, char *name,
+		     int max_channels, int oss_port,
+		     struct snd_seq_port_callback *callback)
 {
-	snd_emux_port_t *p;
+	struct snd_emux_port *p;
 	int i, type, cap;
 
 	/* Allocate structures for this channel */
@@ -150,7 +150,7 @@
 		snd_printk("no memory\n");
 		return NULL;
 	}
-	p->chset.channels = kcalloc(max_channels, sizeof(snd_midi_channel_t), GFP_KERNEL);
+	p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL);
 	if (p->chset.channels == NULL) {
 		snd_printk("no memory\n");
 		kfree(p);
@@ -190,7 +190,7 @@
 static void
 free_port(void *private_data)
 {
-	snd_emux_port_t *p;
+	struct snd_emux_port *p;
 
 	p = private_data;
 	if (p) {
@@ -209,7 +209,7 @@
  * initialize the port specific parameters
  */
 static void
-snd_emux_init_port(snd_emux_port_t *p)
+snd_emux_init_port(struct snd_emux_port *p)
 {
 	p->drum_flags = DEFAULT_DRUM_FLAGS;
 	p->volume_atten = 0;
@@ -222,7 +222,7 @@
  * reset port
  */
 void
-snd_emux_reset_port(snd_emux_port_t *port)
+snd_emux_reset_port(struct snd_emux_port *port)
 {
 	int i;
 
@@ -241,7 +241,7 @@
 	port->ctrls[EMUX_MD_REALTIME_PAN] = 1;
 
 	for (i = 0; i < port->chset.max_channels; i++) {
-		snd_midi_channel_t *chan = port->chset.channels + i;
+		struct snd_midi_channel *chan = port->chset.channels + i;
 		chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0;
 	}
 }
@@ -251,10 +251,10 @@
  * input sequencer event
  */
 int
-snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private_data,
+snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private_data,
 		     int atomic, int hop)
 {
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = private_data;
 	snd_assert(port != NULL && ev != NULL, return -EINVAL);
@@ -269,7 +269,7 @@
  * increment usage count
  */
 int
-snd_emux_inc_count(snd_emux_t *emu)
+snd_emux_inc_count(struct snd_emux *emu)
 {
 	emu->used++;
 	if (!try_module_get(emu->ops.owner))
@@ -288,7 +288,7 @@
  * decrease usage count
  */
 void
-snd_emux_dec_count(snd_emux_t *emu)
+snd_emux_dec_count(struct snd_emux *emu)
 {
 	module_put(emu->card->module);
 	emu->used--;
@@ -302,10 +302,10 @@
  * Routine that is called upon a first use of a particular port
  */
 static int
-snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info)
+snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_emux_port_t *p;
-	snd_emux_t *emu;
+	struct snd_emux_port *p;
+	struct snd_emux *emu;
 
 	p = private_data;
 	snd_assert(p != NULL, return -EINVAL);
@@ -323,10 +323,10 @@
  * Routine that is called upon the last unuse() of a particular port.
  */
 static int
-snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_emux_port_t *p;
-	snd_emux_t *emu;
+	struct snd_emux_port *p;
+	struct snd_emux *emu;
 
 	p = private_data;
 	snd_assert(p != NULL, return -EINVAL);
@@ -345,10 +345,10 @@
  * Create a sequencer client
  */
 static int
-get_client(snd_card_t *card, int index, char *name)
+get_client(struct snd_card *card, int index, char *name)
 {
-	snd_seq_client_callback_t callbacks;
-	snd_seq_client_info_t cinfo;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_client_info cinfo;
 	int client;
 
 	memset(&callbacks, 0, sizeof(callbacks));
@@ -374,7 +374,7 @@
 /*
  * attach virtual rawmidi devices
  */
-int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card)
+int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card)
 {
 	int i;
 
@@ -382,13 +382,13 @@
 	if (emu->midi_ports <= 0)
 		return 0;
 
-	emu->vmidi = kcalloc(emu->midi_ports, sizeof(snd_rawmidi_t*), GFP_KERNEL);
+	emu->vmidi = kcalloc(emu->midi_ports, sizeof(struct snd_rawmidi *), GFP_KERNEL);
 	if (emu->vmidi == NULL)
 		return -ENOMEM;
 
 	for (i = 0; i < emu->midi_ports; i++) {
-		snd_rawmidi_t *rmidi;
-		snd_virmidi_dev_t *rdev;
+		struct snd_rawmidi *rmidi;
+		struct snd_virmidi_dev *rdev;
 		if (snd_virmidi_new(card, emu->midi_devidx + i, &rmidi) < 0)
 			goto __error;
 		rdev = rmidi->private_data;
@@ -411,7 +411,7 @@
 	return -ENOMEM;
 }
 
-int snd_emux_delete_virmidi(snd_emux_t *emu)
+int snd_emux_delete_virmidi(struct snd_emux *emu)
 {
 	int i;
 
