X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fppc%2Fpmac.c;h=aa57170101fd44dd2a090b0acd2c302bbe00e3e8;hb=2d753e62b87ab2fc72bb4ff5153791d32ff9c08e;hp=a642e4cfcf45e2188104b0b4488f26c6d6c12e97;hpb=0825788ff27c7145e9d558cb2a26f3837d1f9be5;p=linux-2.6-omap-h63xx.git diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index a642e4cfcf4..aa57170101f 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -66,7 +66,7 @@ static int snd_pmac_dbdma_alloc(struct snd_pmac *chip, struct pmac_dbdma *rec, i static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec) { - if (rec) { + if (rec->space) { unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1); dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base); @@ -881,6 +881,7 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) chip->can_capture = 1; chip->num_freqs = ARRAY_SIZE(awacs_freqs); chip->freq_table = awacs_freqs; + chip->pdev = NULL; chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */ @@ -1216,7 +1217,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) goto __error; } for (i = 0; i < 3; i ++) { - if (of_address_to_resource(np->parent, i, + if (of_address_to_resource(np, i, &chip->rsrc[i])) { printk(KERN_ERR "snd: can't translate rsrc " " %d (%s)\n", i, rnames[i]);