diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index 0513137..ce73f3ea 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -99,32 +99,32 @@
 	HARMONY_SR_44KHZ, HARMONY_SR_48KHZ
 };
 
-static snd_pcm_hw_constraint_list_t hw_constraint_rates = {
+static struct snd_pcm_hw_constraint_list hw_constraint_rates = {
 	.count = ARRAY_SIZE(snd_harmony_rates),
 	.list = snd_harmony_rates,
 	.mask = 0,
 };
 
-inline unsigned long
-harmony_read(harmony_t *h, unsigned r)
+static inline unsigned long
+harmony_read(struct snd_harmony *h, unsigned r)
 {
 	return __raw_readl(h->iobase + r);
 }
 
-inline void
-harmony_write(harmony_t *h, unsigned r, unsigned long v)
+static inline void
+harmony_write(struct snd_harmony *h, unsigned r, unsigned long v)
 {
 	__raw_writel(v, h->iobase + r);
 }
 
-static void
-harmony_wait_for_control(harmony_t *h)
+static inline void
+harmony_wait_for_control(struct snd_harmony *h)
 {
 	while (harmony_read(h, HARMONY_CNTL) & HARMONY_CNTL_C) ;
 }
 
-inline void
-harmony_reset(harmony_t *h)
+static inline void
+harmony_reset(struct snd_harmony *h)
 {
 	harmony_write(h, HARMONY_RESET, 1);
 	mdelay(50);
@@ -132,7 +132,7 @@
 }
 
 static void
-harmony_disable_interrupts(harmony_t *h)
+harmony_disable_interrupts(struct snd_harmony *h)
 {
 	u32 dstatus;
 	harmony_wait_for_control(h);
@@ -142,7 +142,7 @@
 }
 
 static void
-harmony_enable_interrupts(harmony_t *h)
+harmony_enable_interrupts(struct snd_harmony *h)
 {
 	u32 dstatus;
 	harmony_wait_for_control(h);
@@ -152,7 +152,7 @@
 }
 
 static void
-harmony_mute(harmony_t *h)
+harmony_mute(struct snd_harmony *h)
 {
 	unsigned long flags;
 
@@ -163,7 +163,7 @@
 }
 
 static void
-harmony_unmute(harmony_t *h)
+harmony_unmute(struct snd_harmony *h)
 {
 	unsigned long flags;
 
@@ -174,7 +174,7 @@
 }
 
 static void
-harmony_set_control(harmony_t *h)
+harmony_set_control(struct snd_harmony *h)
 {
 	u32 ctrl;
 	unsigned long flags;
@@ -196,7 +196,7 @@
 snd_harmony_interrupt(int irq, void *dev, struct pt_regs *regs)
 {
 	u32 dstatus;
-	harmony_t *h = dev;
+	struct snd_harmony *h = dev;
 
 	spin_lock(&h->lock);
 	harmony_disable_interrupts(h);
@@ -261,7 +261,7 @@
 	return HARMONY_SR_44KHZ;
 }
 
-static snd_pcm_hardware_t snd_harmony_playback =
+static struct snd_pcm_hardware snd_harmony_playback =
 {
 	.info =	(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 
 		 SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID |
@@ -282,7 +282,7 @@
 	.fifo_size = 0,
 };
 
-static snd_pcm_hardware_t snd_harmony_capture =
+static struct snd_pcm_hardware snd_harmony_capture =
 {
         .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                  SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID |
@@ -304,9 +304,9 @@
 };
 
 static int
-snd_harmony_playback_trigger(snd_pcm_substream_t *ss, int cmd)
+snd_harmony_playback_trigger(struct snd_pcm_substream *ss, int cmd)
 {
-	harmony_t *h = snd_pcm_substream_chip(ss);
+	struct snd_harmony *h = snd_pcm_substream_chip(ss);
 
 	if (h->st.capturing)
 		return -EBUSY;
@@ -340,9 +340,9 @@
 }
 
 static int
-snd_harmony_capture_trigger(snd_pcm_substream_t *ss, int cmd)
+snd_harmony_capture_trigger(struct snd_pcm_substream *ss, int cmd)
 {
-        harmony_t *h = snd_pcm_substream_chip(ss);
+        struct snd_harmony *h = snd_pcm_substream_chip(ss);
 
 	if (h->st.playing)
 		return -EBUSY;
@@ -376,7 +376,7 @@
 }
 
 static int
-snd_harmony_set_data_format(harmony_t *h, int fmt, int force)
+snd_harmony_set_data_format(struct snd_harmony *h, int fmt, int force)
 {
 	int o = h->st.format;
 	int n;
@@ -406,10 +406,10 @@
 }
 
 static int
-snd_harmony_playback_prepare(snd_pcm_substream_t *ss)
+snd_harmony_playback_prepare(struct snd_pcm_substream *ss)
 {
-	harmony_t *h = snd_pcm_substream_chip(ss);
-	snd_pcm_runtime_t *rt = ss->runtime;
+	struct snd_harmony *h = snd_pcm_substream_chip(ss);
+	struct snd_pcm_runtime *rt = ss->runtime;
 	
 	if (h->st.capturing)
 		return -EBUSY;
@@ -436,10 +436,10 @@
 }
 
 static int
-snd_harmony_capture_prepare(snd_pcm_substream_t *ss)
+snd_harmony_capture_prepare(struct snd_pcm_substream *ss)
 {
-        harmony_t *h = snd_pcm_substream_chip(ss);
-        snd_pcm_runtime_t *rt = ss->runtime;
+        struct snd_harmony *h = snd_pcm_substream_chip(ss);
+        struct snd_pcm_runtime *rt = ss->runtime;
 
 	if (h->st.playing)
 		return -EBUSY;
@@ -466,10 +466,10 @@
 }
 
 static snd_pcm_uframes_t 
-snd_harmony_playback_pointer(snd_pcm_substream_t *ss)
+snd_harmony_playback_pointer(struct snd_pcm_substream *ss)
 {
-	snd_pcm_runtime_t *rt = ss->runtime;
-	harmony_t *h = snd_pcm_substream_chip(ss);
+	struct snd_pcm_runtime *rt = ss->runtime;
+	struct snd_harmony *h = snd_pcm_substream_chip(ss);
 	unsigned long pcuradd;
 	unsigned long played;
 
@@ -495,10 +495,10 @@
 }
 
 static snd_pcm_uframes_t
-snd_harmony_capture_pointer(snd_pcm_substream_t *ss)
+snd_harmony_capture_pointer(struct snd_pcm_substream *ss)
 {
-        snd_pcm_runtime_t *rt = ss->runtime;
-        harmony_t *h = snd_pcm_substream_chip(ss);
+        struct snd_pcm_runtime *rt = ss->runtime;
+        struct snd_harmony *h = snd_pcm_substream_chip(ss);
         unsigned long rcuradd;
         unsigned long caught;
 
@@ -524,10 +524,10 @@
 }
 
 static int 
-snd_harmony_playback_open(snd_pcm_substream_t *ss)
+snd_harmony_playback_open(struct snd_pcm_substream *ss)
 {
-	harmony_t *h = snd_pcm_substream_chip(ss);
-	snd_pcm_runtime_t *rt = ss->runtime;
+	struct snd_harmony *h = snd_pcm_substream_chip(ss);
+	struct snd_pcm_runtime *rt = ss->runtime;
 	int err;
 	
 	h->psubs = ss;
@@ -543,10 +543,10 @@
 }
 
 static int
-snd_harmony_capture_open(snd_pcm_substream_t *ss)
+snd_harmony_capture_open(struct snd_pcm_substream *ss)
 {
-        harmony_t *h = snd_pcm_substream_chip(ss);
-        snd_pcm_runtime_t *rt = ss->runtime;
+        struct snd_harmony *h = snd_pcm_substream_chip(ss);
+        struct snd_pcm_runtime *rt = ss->runtime;
         int err;
 
         h->csubs = ss;
@@ -562,27 +562,27 @@
 }
 
 static int 
-snd_harmony_playback_close(snd_pcm_substream_t *ss)
+snd_harmony_playback_close(struct snd_pcm_substream *ss)
 {
-	harmony_t *h = snd_pcm_substream_chip(ss);
+	struct snd_harmony *h = snd_pcm_substream_chip(ss);
 	h->psubs = NULL;
 	return 0;
 }
 
 static int
-snd_harmony_capture_close(snd_pcm_substream_t *ss)
+snd_harmony_capture_close(struct snd_pcm_substream *ss)
 {
-        harmony_t *h = snd_pcm_substream_chip(ss);
+        struct snd_harmony *h = snd_pcm_substream_chip(ss);
         h->csubs = NULL;
         return 0;
 }
 
 static int 
-snd_harmony_hw_params(snd_pcm_substream_t *ss,
-		      snd_pcm_hw_params_t *hw)
+snd_harmony_hw_params(struct snd_pcm_substream *ss,
+		      struct snd_pcm_hw_params *hw)
 {
 	int err;
-	harmony_t *h = snd_pcm_substream_chip(ss);
+	struct snd_harmony *h = snd_pcm_substream_chip(ss);
 	
 	err = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw));
 	if (err > 0 && h->dma.type == SNDRV_DMA_TYPE_CONTINUOUS)
@@ -592,12 +592,12 @@
 }
 
 static int 
-snd_harmony_hw_free(snd_pcm_substream_t *ss) 
+snd_harmony_hw_free(struct snd_pcm_substream *ss) 
 {
 	return snd_pcm_lib_free_pages(ss);
 }
 
-static snd_pcm_ops_t snd_harmony_playback_ops = {
+static struct snd_pcm_ops snd_harmony_playback_ops = {
 	.open =	snd_harmony_playback_open,
 	.close = snd_harmony_playback_close,
 	.ioctl = snd_pcm_lib_ioctl,
@@ -608,7 +608,7 @@
  	.pointer = snd_harmony_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_harmony_capture_ops = {
+static struct snd_pcm_ops snd_harmony_capture_ops = {
         .open = snd_harmony_capture_open,
         .close = snd_harmony_capture_close,
         .ioctl = snd_pcm_lib_ioctl,
@@ -620,9 +620,9 @@
 };
 
 static int 
-snd_harmony_pcm_init(harmony_t *h)
+snd_harmony_pcm_init(struct snd_harmony *h)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	harmony_disable_interrupts(h);
@@ -683,15 +683,15 @@
 }
 
 static void 
-snd_harmony_set_new_gain(harmony_t *h)
+snd_harmony_set_new_gain(struct snd_harmony *h)
 {
  	harmony_wait_for_control(h);
 	harmony_write(h, HARMONY_GAINCTL, h->st.gain);
 }
 
 static int 
-snd_harmony_mixercontrol_info(snd_kcontrol_t *kc, 
-			      snd_ctl_elem_info_t *uinfo)
+snd_harmony_mixercontrol_info(struct snd_kcontrol *kc, 
+			      struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kc->private_value >> 16) & 0xff;
 	int left_shift = (kc->private_value) & 0xff;
@@ -707,10 +707,10 @@
 }
 
 static int 
-snd_harmony_volume_get(snd_kcontrol_t *kc, 
-		       snd_ctl_elem_value_t *ucontrol)
+snd_harmony_volume_get(struct snd_kcontrol *kc, 
+		       struct snd_ctl_elem_value *ucontrol)
 {
-	harmony_t *h = snd_kcontrol_chip(kc);
+	struct snd_harmony *h = snd_kcontrol_chip(kc);
 	int shift_left = (kc->private_value) & 0xff;
 	int shift_right = (kc->private_value >> 8) & 0xff;
 	int mask = (kc->private_value >> 16) & 0xff;
@@ -736,10 +736,10 @@
 }  
 
 static int 
-snd_harmony_volume_put(snd_kcontrol_t *kc, 
-		       snd_ctl_elem_value_t *ucontrol)
+snd_harmony_volume_put(struct snd_kcontrol *kc, 
+		       struct snd_ctl_elem_value *ucontrol)
 {
-	harmony_t *h = snd_kcontrol_chip(kc);
+	struct snd_harmony *h = snd_kcontrol_chip(kc);
 	int shift_left = (kc->private_value) & 0xff;
 	int shift_right = (kc->private_value >> 8) & 0xff;
 	int mask = (kc->private_value >> 16) & 0xff;
@@ -771,8 +771,8 @@
 }
 
 static int 
-snd_harmony_captureroute_info(snd_kcontrol_t *kc, 
-			      snd_ctl_elem_info_t *uinfo)
+snd_harmony_captureroute_info(struct snd_kcontrol *kc, 
+			      struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[2] = { "Line", "Mic" };
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -786,10 +786,10 @@
 }
 
 static int 
-snd_harmony_captureroute_get(snd_kcontrol_t *kc, 
-			     snd_ctl_elem_value_t *ucontrol)
+snd_harmony_captureroute_get(struct snd_kcontrol *kc, 
+			     struct snd_ctl_elem_value *ucontrol)
 {
-	harmony_t *h = snd_kcontrol_chip(kc);
+	struct snd_harmony *h = snd_kcontrol_chip(kc);
 	int value;
 	
 	spin_lock_irq(&h->mixer_lock);
@@ -803,10 +803,10 @@
 }  
 
 static int 
-snd_harmony_captureroute_put(snd_kcontrol_t *kc, 
-			     snd_ctl_elem_value_t *ucontrol)
+snd_harmony_captureroute_put(struct snd_kcontrol *kc, 
+			     struct snd_ctl_elem_value *ucontrol)
 {
-	harmony_t *h = snd_kcontrol_chip(kc);
+	struct snd_harmony *h = snd_kcontrol_chip(kc);
 	int value;
 	int old_gain = h->st.gain;
 	
@@ -823,8 +823,7 @@
 	return h->st.gain != old_gain;
 }
 
-#define HARMONY_CONTROLS (sizeof(snd_harmony_controls)/ \
-                          sizeof(snd_kcontrol_new_t))
+#define HARMONY_CONTROLS	ARRAY_SIZE(snd_harmony_controls)
 
 #define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,                \
@@ -833,7 +832,7 @@
   .private_value = ((left_shift) | ((right_shift) << 8) |            \
                    ((mask) << 16) | ((invert) << 24)) }
 
-static snd_kcontrol_new_t snd_harmony_controls[] = {
+static struct snd_kcontrol_new snd_harmony_controls[] = {
 	HARMONY_VOLUME("Master Playback Volume", HARMONY_GAIN_LO_SHIFT, 
 		       HARMONY_GAIN_RO_SHIFT, HARMONY_GAIN_OUT, 1),
 	HARMONY_VOLUME("Capture Volume", HARMONY_GAIN_LI_SHIFT,
@@ -856,7 +855,7 @@
 };
 
 static void __init 
-snd_harmony_mixer_reset(harmony_t *h)
+snd_harmony_mixer_reset(struct snd_harmony *h)
 {
 	harmony_mute(h);
 	harmony_reset(h);
@@ -865,9 +864,9 @@
 }
 
 static int __init 
-snd_harmony_mixer_init(harmony_t *h)
+snd_harmony_mixer_init(struct snd_harmony *h)
 {
-	snd_card_t *card = h->card;
+	struct snd_card *card = h->card;
 	int idx, err;
 
 	snd_assert(h != NULL, return -EINVAL);
@@ -886,7 +885,7 @@
 }
 
 static int
-snd_harmony_free(harmony_t *h)
+snd_harmony_free(struct snd_harmony *h)
 {
         if (h->gdma.addr)
                 snd_dma_free_pages(&h->gdma);
@@ -906,20 +905,20 @@
 }
 
 static int
-snd_harmony_dev_free(snd_device_t *dev)
+snd_harmony_dev_free(struct snd_device *dev)
 {
-	harmony_t *h = dev->device_data;
+	struct snd_harmony *h = dev->device_data;
 	return snd_harmony_free(h);
 }
 
 static int __devinit
-snd_harmony_create(snd_card_t *card, 
+snd_harmony_create(struct snd_card *card, 
 		   struct parisc_device *padev, 
-		   harmony_t **rchip)
+		   struct snd_harmony **rchip)
 {
 	int err;
-	harmony_t *h;
-	static snd_device_ops_t ops = {
+	struct snd_harmony *h;
+	static struct snd_device_ops ops = {
 		.dev_free = snd_harmony_dev_free,
 	};
 
@@ -973,8 +972,8 @@
 snd_harmony_probe(struct parisc_device *padev)
 {
 	int err;
-	snd_card_t *card;
-	harmony_t *h;
+	struct snd_card *card;
+	struct snd_harmony *h;
 
 	card = snd_card_new(index, id, THIS_MODULE, 0);
 	if (card == NULL)
@@ -1033,7 +1032,7 @@
 static void __exit
 alsa_harmony_fini(void)
 {
-	return unregister_parisc_driver(&snd_harmony_driver);
+	unregister_parisc_driver(&snd_harmony_driver);
 }
 
 MODULE_LICENSE("GPL");
diff --git a/sound/parisc/harmony.h b/sound/parisc/harmony.h
index 526c523..2e43452 100644
--- a/sound/parisc/harmony.h
+++ b/sound/parisc/harmony.h
@@ -13,7 +13,7 @@
         int coherent;
 };
 
-typedef struct snd_card_harmony {
+struct snd_harmony {
         int irq;
 
         unsigned long hpa; /* hard physical address */
@@ -44,15 +44,15 @@
                 unsigned long silence_intr;
         } stats;
 
-        snd_pcm_t *pcm;
-        snd_card_t *card;
-        snd_pcm_substream_t *psubs;
-	snd_pcm_substream_t *csubs;
-        snd_info_entry_t *proc;
+        struct snd_pcm *pcm;
+        struct snd_card *card;
+        struct snd_pcm_substream *psubs;
+	struct snd_pcm_substream *csubs;
+        struct snd_info_entry *proc;
 
         spinlock_t lock;
         spinlock_t mixer_lock;
-} harmony_t;
+};
 
 #define MAX_PCM_DEVICES     1
 #define MAX_PCM_SUBSTREAMS  4
