Merge branch 'topic/bkl' into topic/core-cleanup
[safe/jmp/linux-2.6] / sound / ppc / beep.c
index 465dd04..a9d3507 100644 (file)
@@ -18,7 +18,6 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <linux/init.h>
@@ -186,7 +185,8 @@ static int snd_pmac_get_beep(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_value *ucontrol)
 {
        struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
-       snd_assert(chip->beep, return -ENXIO);
+       if (snd_BUG_ON(!chip->beep))
+               return -ENXIO;
        ucontrol->value.integer.value[0] = chip->beep->volume;
        return 0;
 }
@@ -196,7 +196,8 @@ static int snd_pmac_put_beep(struct snd_kcontrol *kcontrol,
 {
        struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
        unsigned int oval, nval;
-       snd_assert(chip->beep, return -ENXIO);
+       if (snd_BUG_ON(!chip->beep))
+               return -ENXIO;
        oval = chip->beep->volume;
        nval = ucontrol->value.integer.value[0];
        if (nval > 100)
@@ -214,7 +215,7 @@ static struct snd_kcontrol_new snd_pmac_beep_mixer = {
 };
 
 /* Initialize beep stuff */
-int __init snd_pmac_attach_beep(struct snd_pmac *chip)
+int __devinit snd_pmac_attach_beep(struct snd_pmac *chip)
 {
        struct pmac_beep *beep;
        struct input_dev *input_dev;