]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/parisc/harmony.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / sound / parisc / harmony.c
index 6055fd6d3b38ee90ba6d19895363ef33db38f275..f47f9e226b0823c35970fcbed96096e18042d15f 100644 (file)
@@ -624,6 +624,9 @@ snd_harmony_pcm_init(struct snd_harmony *h)
        struct snd_pcm *pcm;
        int err;
 
+       if (snd_BUG_ON(!h))
+               return -EINVAL;
+
        harmony_disable_interrupts(h);
        
        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
 snd_harmony_mixer_init(struct snd_harmony *h)
 {
-       struct snd_card *card = h->card;
+       struct snd_card *card;
        int idx, err;
 
        if (snd_BUG_ON(!h))
                return -EINVAL;
+       card = h->card;
        strcpy(card->mixername, "Harmony Gain control interface");
 
        for (idx = 0; idx < HARMONY_CONTROLS; idx++) {
@@ -935,7 +939,7 @@ snd_harmony_create(struct snd_card *card,
        h->iobase = ioremap_nocache(padev->hpa.start, HARMONY_SIZE);
        if (h->iobase == NULL) {
                printk(KERN_ERR PFX "unable to remap hpa 0x%lx\n",
-                      padev->hpa.start);
+                      (unsigned long)padev->hpa.start);
                err = -EBUSY;
                goto free_and_ret;
        }
@@ -1020,7 +1024,7 @@ static struct parisc_driver snd_harmony_driver = {
        .name = "harmony",
        .id_table = snd_harmony_devtable,
        .probe = snd_harmony_probe,
-       .remove = snd_harmony_remove,
+       .remove = __devexit_p(snd_harmony_remove),
 };
 
 static int __init