|
@@ -624,6 +624,9 @@ snd_harmony_pcm_init(struct snd_harmony *h)
|
|
struct snd_pcm *pcm;
|
|
struct snd_pcm *pcm;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
|
|
+ if (snd_BUG_ON(!h))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
harmony_disable_interrupts(h);
|
|
harmony_disable_interrupts(h);
|
|
|
|
|
|
err = snd_pcm_new(h->card, "harmony", 0, 1, 1, &pcm);
|
|
err = snd_pcm_new(h->card, "harmony", 0, 1, 1, &pcm);
|
|
@@ -865,11 +868,12 @@ snd_harmony_mixer_reset(struct snd_harmony *h)
|
|
static int __devinit
|
|
static int __devinit
|
|
snd_harmony_mixer_init(struct snd_harmony *h)
|
|
snd_harmony_mixer_init(struct snd_harmony *h)
|
|
{
|
|
{
|
|
- struct snd_card *card = h->card;
|
|
|
|
|
|
+ struct snd_card *card;
|
|
int idx, err;
|
|
int idx, err;
|
|
|
|
|
|
if (snd_BUG_ON(!h))
|
|
if (snd_BUG_ON(!h))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
+ card = h->card;
|
|
strcpy(card->mixername, "Harmony Gain control interface");
|
|
strcpy(card->mixername, "Harmony Gain control interface");
|
|
|
|
|
|
for (idx = 0; idx < HARMONY_CONTROLS; idx++) {
|
|
for (idx = 0; idx < HARMONY_CONTROLS; idx++) {
|