/* * Vortex Mixer support. * * There is much more than just the AC97 mixer... * */ #include #include #include #include "au88x0.h" static int remove_ctl(struct snd_card *card, const char *name) { struct snd_ctl_elem_id id; memset(&id, 0, sizeof(id)); strcpy(id.name, name); id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; return snd_ctl_remove_id(card, &id); } static int snd_vortex_mixer(vortex_t *vortex) { struct snd_ac97_bus *pbus; struct snd_ac97_template ac97; int err; static struct snd_ac97_bus_ops ops = { .write = vortex_codec_write, .read = vortex_codec_read, }; if ((err = snd_ac97_bus(vortex->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); // Initialize AC97 codec stuff. ac97.private_data = vortex; ac97.scaps = AC97_SCAP_NO_SPDIF; err = snd_ac97_mixer(pbus, &ac97, &vortex->codec); vortex->isquad = ((vortex->codec == NULL) ? 0 : (vortex->codec->ext_id&0x80)); remove_ctl(vortex->card, "Master Mono Playback Volume"); remove_ctl(vortex->card, "Master Mono Playback Switch"); return err; } net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@gmail.com>2017-01-24 10:12:00 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-24 10:27:34 -0800
commit3f5c34c6d4688b3b7e1dbc7bbc68a2f03a0d6b0c (patch)
treeb9387d85890c4466d9cf3d3145c95e0b07235234 /net/netfilter/nft_objref.c
parent62ed8ceda1699acae01b666497f004bfd3d67a6f (diff)
Input: wm97xx - make missing platform data non-fatal
Commit 6480af4915d6 ("power_supply: wm97xx_battery: use power_supply_get_drvdata") made wm97xx platform data mandatory, although it's still optional. This patch fixes an oops during driver probe on one of my MIPS boards with a wm9712. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'net/netfilter/nft_objref.c')