diff options
Diffstat (limited to 'sound/ppc/pmac.c')
-rw-r--r-- | sound/ppc/pmac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index a642e4cfcf45..aa57170101fd 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 | |||
66 | 66 | ||
67 | static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec) | 67 | static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec) |
68 | { | 68 | { |
69 | if (rec) { | 69 | if (rec->space) { |
70 | unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1); | 70 | unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1); |
71 | 71 | ||
72 | dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base); | 72 | 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) | |||
881 | chip->can_capture = 1; | 881 | chip->can_capture = 1; |
882 | chip->num_freqs = ARRAY_SIZE(awacs_freqs); | 882 | chip->num_freqs = ARRAY_SIZE(awacs_freqs); |
883 | chip->freq_table = awacs_freqs; | 883 | chip->freq_table = awacs_freqs; |
884 | chip->pdev = NULL; | ||
884 | 885 | ||
885 | chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */ | 886 | chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */ |
886 | 887 | ||
@@ -1216,7 +1217,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) | |||
1216 | goto __error; | 1217 | goto __error; |
1217 | } | 1218 | } |
1218 | for (i = 0; i < 3; i ++) { | 1219 | for (i = 0; i < 3; i ++) { |
1219 | if (of_address_to_resource(np->parent, i, | 1220 | if (of_address_to_resource(np, i, |
1220 | &chip->rsrc[i])) { | 1221 | &chip->rsrc[i])) { |
1221 | printk(KERN_ERR "snd: can't translate rsrc " | 1222 | printk(KERN_ERR "snd: can't translate rsrc " |
1222 | " %d (%s)\n", i, rnames[i]); | 1223 | " %d (%s)\n", i, rnames[i]); |