Skip to content

Commit

Permalink
dmaengine: apple-admac: Fix grabbing of channels in of_xlate
Browse files Browse the repository at this point in the history
The of_xlate callback is supposed to return the channel after already
having 'grabbed' it for private use, so fill that in.

Fixes: b127315 ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20221019132324.8585-1-povik+lin@cutebit.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
povik authored and vinodkoul committed Nov 8, 2022
1 parent 0b8c97a commit 8454f88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/apple-admac.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ static struct dma_chan *admac_dma_of_xlate(struct of_phandle_args *dma_spec,
return NULL;
}

return &ad->channels[index].chan;
return dma_get_slave_channel(&ad->channels[index].chan);
}

static int admac_drain_reports(struct admac_data *ad, int channo)
Expand Down

0 comments on commit 8454f88

Please sign in to comment.