Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / sound / isa / gus / gus_timer.c
index 854b35d..a43b662 100644 (file)
 #include <sound/core.h>
 #include <sound/gus.h>
 
-#define chip_t snd_gus_card_t
-
 /*
  *  Timer 1 - 80us
  */
 
-static int snd_gf1_timer1_start(snd_timer_t * timer)
+static int snd_gf1_timer1_start(struct snd_timer * timer)
 {
        unsigned long flags;
        unsigned char tmp;
        unsigned int ticks;
-       snd_gus_card_t *gus;
+       struct snd_gus_card *gus;
 
        gus = snd_timer_chip(timer);
        spin_lock_irqsave(&gus->reg_lock, flags);
@@ -50,11 +48,11 @@ static int snd_gf1_timer1_start(snd_timer_t * timer)
        return 0;
 }
 
-static int snd_gf1_timer1_stop(snd_timer_t * timer)
+static int snd_gf1_timer1_stop(struct snd_timer * timer)
 {
        unsigned long flags;
        unsigned char tmp;
-       snd_gus_card_t *gus;
+       struct snd_gus_card *gus;
 
        gus = snd_timer_chip(timer);
        spin_lock_irqsave(&gus->reg_lock, flags);
@@ -68,12 +66,12 @@ static int snd_gf1_timer1_stop(snd_timer_t * timer)
  *  Timer 2 - 320us
  */
 
-static int snd_gf1_timer2_start(snd_timer_t * timer)
+static int snd_gf1_timer2_start(struct snd_timer * timer)
 {
        unsigned long flags;
        unsigned char tmp;
        unsigned int ticks;
-       snd_gus_card_t *gus;
+       struct snd_gus_card *gus;
 
        gus = snd_timer_chip(timer);
        spin_lock_irqsave(&gus->reg_lock, flags);
@@ -86,11 +84,11 @@ static int snd_gf1_timer2_start(snd_timer_t * timer)
        return 0;
 }
 
-static int snd_gf1_timer2_stop(snd_timer_t * timer)
+static int snd_gf1_timer2_stop(struct snd_timer * timer)
 {
        unsigned long flags;
        unsigned char tmp;
-       snd_gus_card_t *gus;
+       struct snd_gus_card *gus;
 
        gus = snd_timer_chip(timer);
        spin_lock_irqsave(&gus->reg_lock, flags);
@@ -104,18 +102,18 @@ static int snd_gf1_timer2_stop(snd_timer_t * timer)
 
  */
 
-static void snd_gf1_interrupt_timer1(snd_gus_card_t * gus)
+static void snd_gf1_interrupt_timer1(struct snd_gus_card * gus)
 {
-       snd_timer_t *timer = gus->gf1.timer1;
+       struct snd_timer *timer = gus->gf1.timer1;
 
        if (timer == NULL)
                return;
        snd_timer_interrupt(timer, timer->sticks);
 }
 
-static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus)
+static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
 {
-       snd_timer_t *timer = gus->gf1.timer2;
+       struct snd_timer *timer = gus->gf1.timer2;
 
        if (timer == NULL)
                return;
@@ -126,7 +124,7 @@ static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus)
 
  */
 
-static struct _snd_timer_hardware snd_gf1_timer1 =
+static struct snd_timer_hardware snd_gf1_timer1 =
 {
        .flags =        SNDRV_TIMER_HW_STOP,
        .resolution =   80000,
@@ -135,7 +133,7 @@ static struct _snd_timer_hardware snd_gf1_timer1 =
        .stop =         snd_gf1_timer1_stop,
 };
 
-static struct _snd_timer_hardware snd_gf1_timer2 =
+static struct snd_timer_hardware snd_gf1_timer2 =
 {
        .flags =        SNDRV_TIMER_HW_STOP,
        .resolution =   320000,
@@ -144,22 +142,22 @@ static struct _snd_timer_hardware snd_gf1_timer2 =
        .stop =         snd_gf1_timer2_stop,
 };
 
-static void snd_gf1_timer1_free(snd_timer_t *timer)
+static void snd_gf1_timer1_free(struct snd_timer *timer)
 {
-       snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, timer->private_data, return);
+       struct snd_gus_card *gus = timer->private_data;
        gus->gf1.timer1 = NULL;
 }
 
-static void snd_gf1_timer2_free(snd_timer_t *timer)
+static void snd_gf1_timer2_free(struct snd_timer *timer)
 {
-       snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, timer->private_data, return);
+       struct snd_gus_card *gus = timer->private_data;
        gus->gf1.timer2 = NULL;
 }
 
-void snd_gf1_timers_init(snd_gus_card_t * gus)
+void snd_gf1_timers_init(struct snd_gus_card * gus)
 {
-       snd_timer_t *timer;
-       snd_timer_id_t tid;
+       struct snd_timer *timer;
+       struct snd_timer_id tid;
 
        if (gus->gf1.timer1 != NULL || gus->gf1.timer2 != NULL)
                return;
@@ -192,7 +190,7 @@ void snd_gf1_timers_init(snd_gus_card_t * gus)
        gus->gf1.timer2 = timer;
 }
 
-void snd_gf1_timers_done(snd_gus_card_t * gus)
+void snd_gf1_timers_done(struct snd_gus_card * gus)
 {
        snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_TIMER1 | SNDRV_GF1_HANDLER_TIMER2);
        if (gus->gf1.timer1) {