X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fppc%2Ftumbler.c;h=42b55b600428ed20bb715cb3060e13d50c7f2b5c;hb=da7238bfbc1c5267bb3c9a79e03b6c296839a07e;hp=fc94acb2609554932c53acda17d0e8983d4912aa;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index fc94acb26..42b55b600 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c @@ -684,6 +684,8 @@ static int tumbler_put_mute_switch(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_ static int snapper_set_capture_source(pmac_tumbler_t *mix) { + if (! mix->i2c.client) + return -ENODEV; return snd_pmac_keywest_write_byte(&mix->i2c, TAS_REG_ACS, mix->capture_source ? 2 : 0); } @@ -870,7 +872,7 @@ static void tumbler_update_automute(pmac_t *chip, int do_notify) /* interrupt - headphone plug changed */ static irqreturn_t headphone_intr(int irq, void *devid, struct pt_regs *regs) { - pmac_t *chip = snd_magic_cast(pmac_t, devid, return); + pmac_t *chip = snd_magic_cast(pmac_t, devid, return IRQ_NONE); if (chip->update_automute && chip->initialized) { chip->update_automute(chip, 1); return IRQ_HANDLED;