aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Andreatta <thomasandreatta2000@gmail.com>2025-08-27 17:24:43 +0200
committerVinod Koul <vkoul@kernel.org>2025-09-02 12:29:36 +0530
commitd9a3e9929452780df16f3414f0d59b5f69d058cf (patch)
tree53e61356f7731960a8dc7f9ba43532aa692e9a06 /include
parentdmaengine: Replace zero-length array with flexible-array (diff)
downloadlinux-d9a3e9929452780df16f3414f0d59b5f69d058cf.tar.gz
linux-d9a3e9929452780df16f3414f0d59b5f69d058cf.zip
dmaengine: sh: setup_xref error handling
This patch modifies the type of setup_xref from void to int and handles errors since the function can fail. `setup_xref` now returns the (eventual) error from `dmae_set_dmars`|`dmae_set_chcr`, while `shdma_tx_submit` handles the result, removing the chunks from the queue and marking PM as idle in case of an error. Signed-off-by: Thomas Andreatta <thomas.andreatta2000@gmail.com> Link: https://lore.kernel.org/r/20250827152442.90962-1-thomas.andreatta2000@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/shdma-base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h
index 6dfd05ef5c2d..03ba4dab2ef7 100644
--- a/include/linux/shdma-base.h
+++ b/include/linux/shdma-base.h
@@ -96,7 +96,7 @@ struct shdma_ops {
int (*desc_setup)(struct shdma_chan *, struct shdma_desc *,
dma_addr_t, dma_addr_t, size_t *);
int (*set_slave)(struct shdma_chan *, int, dma_addr_t, bool);
- void (*setup_xfer)(struct shdma_chan *, int);
+ int (*setup_xfer)(struct shdma_chan *, int);
void (*start_xfer)(struct shdma_chan *, struct shdma_desc *);
struct shdma_desc *(*embedded_desc)(void *, int);
bool (*chan_irq)(struct shdma_chan *, int);