Merge branch 'topic/bkl' into topic/core-cleanup
[safe/jmp/linux-2.6] / sound / ppc / burgundy.c
index bb80770..00e2d51 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <asm/io.h>
 #include <linux/init.h>
-#include <linux/slab.h>
 #include <linux/delay.h>
 #include <sound/core.h>
 #include "pmac.h"
@@ -46,12 +45,12 @@ snd_pmac_burgundy_extend_wait(struct snd_pmac *chip)
        timeout = 50;
        while (!(in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--)
                udelay(1);
-       if (! timeout)
+       if (timeout < 0)
                printk(KERN_DEBUG "burgundy_extend_wait: timeout #1\n");
        timeout = 50;
        while ((in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--)
                udelay(1);
-       if (! timeout)
+       if (timeout < 0)
                printk(KERN_DEBUG "burgundy_extend_wait: timeout #2\n");
 }
 
@@ -505,7 +504,7 @@ static struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] __devinitdata = {
                        MASK_ADDR_BURGUNDY_GAINLINE, 1, 0),
        BURGUNDY_VOLUME_B("Mic Gain Capture Volume", 0,
                        MASK_ADDR_BURGUNDY_GAINMIC, 1, 0),
-       BURGUNDY_VOLUME_B("PC Speaker Playback Volume", 0,
+       BURGUNDY_VOLUME_B("Speaker Playback Volume", 0,
                        MASK_ADDR_BURGUNDY_ATTENSPEAKER, 1, 1),
        BURGUNDY_VOLUME_B("Line out Playback Volume", 0,
                        MASK_ADDR_BURGUNDY_ATTENLINEOUT, 1, 1),
@@ -527,7 +526,7 @@ static struct snd_kcontrol_new snd_pmac_burgundy_mixers_pmac[] __devinitdata = {
                        MASK_ADDR_BURGUNDY_VOLMIC, 16),
        BURGUNDY_VOLUME_B("Line in Gain Capture Volume", 0,
                        MASK_ADDR_BURGUNDY_GAINMIC, 1, 0),
-       BURGUNDY_VOLUME_B("PC Speaker Playback Volume", 0,
+       BURGUNDY_VOLUME_B("Speaker Playback Volume", 0,
                        MASK_ADDR_BURGUNDY_ATTENMONO, 0, 1),
        BURGUNDY_VOLUME_B("Line out Playback Volume", 0,
                        MASK_ADDR_BURGUNDY_ATTENSPEAKER, 1, 1),
@@ -549,11 +548,11 @@ BURGUNDY_SWITCH_B("Master Playback Switch", 0,
        BURGUNDY_OUTPUT_INTERN
        | BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1);
 static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_imac __devinitdata =
-BURGUNDY_SWITCH_B("PC Speaker Playback Switch", 0,
+BURGUNDY_SWITCH_B("Speaker Playback Switch", 0,
        MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
        BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1);
 static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_pmac __devinitdata =
-BURGUNDY_SWITCH_B("PC Speaker Playback Switch", 0,
+BURGUNDY_SWITCH_B("Speaker Playback Switch", 0,
        MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
        BURGUNDY_OUTPUT_INTERN, 0, 0);
 static struct snd_kcontrol_new snd_pmac_burgundy_line_sw_imac __devinitdata =
@@ -582,7 +581,7 @@ static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip)
 static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify)
 {
        if (chip->auto_mute) {
-               int imac = machine_is_compatible("iMac");
+               int imac = of_machine_is_compatible("iMac");
                int reg, oreg;
                reg = oreg = snd_pmac_burgundy_rcb(chip,
                                MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES);
@@ -620,7 +619,7 @@ static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_noti
  */
 int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip)
 {
-       int imac = machine_is_compatible("iMac");
+       int imac = of_machine_is_compatible("iMac");
        int i, err;
 
        /* Checks to see the chip is alive and kicking */