mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue
Use dmaengine terminology and rename the method to better indicate what it does: it gets the residue value which will be later on set with dma_set_residue(). Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-21-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
f5d79afa3a
commit
91617bf6bb
1 changed files with 4 additions and 7 deletions
|
@ -308,14 +308,14 @@ static inline u32 atc_calc_bytes_left(u32 current_len, u32 ctrla)
|
|||
}
|
||||
|
||||
/**
|
||||
* atc_get_bytes_left - get the number of bytes residue for a cookie.
|
||||
* atc_get_residue - get the number of bytes residue for a cookie.
|
||||
* The residue is passed by address and updated on success.
|
||||
* @chan: DMA channel
|
||||
* @cookie: transaction identifier to check status of
|
||||
* @residue: residue to be updated.
|
||||
* Return 0 on success, -errono otherwise.
|
||||
*/
|
||||
static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie,
|
||||
static int atc_get_residue(struct dma_chan *chan, dma_cookie_t cookie,
|
||||
u32 *residue)
|
||||
{
|
||||
struct at_dma_chan *atchan = to_at_dma_chan(chan);
|
||||
|
@ -1471,10 +1471,7 @@ atc_tx_status(struct dma_chan *chan,
|
|||
return dma_status;
|
||||
|
||||
spin_lock_irqsave(&atchan->lock, flags);
|
||||
|
||||
/* Get number of bytes left in the active transactions */
|
||||
ret = atc_get_bytes_left(chan, cookie, &residue);
|
||||
|
||||
ret = atc_get_residue(chan, cookie, &residue);
|
||||
spin_unlock_irqrestore(&atchan->lock, flags);
|
||||
|
||||
if (unlikely(ret < 0)) {
|
||||
|
|
Loading…
Reference in a new issue