Skip to content

Commit cee8cbf

Browse files
nxpfranklivinodkoul
authored andcommitted
dmaengine: fsl-edma: remove 'slave_id' from fsl_edma_chan
The 'slave_id' field is redundant as it duplicates the functionality of 'srcid'. Remove 'slave_id' from fsl_edma_chan to eliminate redundancy. Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240323-8ulp_edma-v3-1-c0e981027c05@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent e32634f commit cee8cbf

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

drivers/dma/fsl-edma-common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ struct fsl_edma_chan {
151151
enum dma_status status;
152152
enum fsl_edma_pm_state pm_state;
153153
bool idle;
154-
u32 slave_id;
155154
struct fsl_edma_engine *edma;
156155
struct fsl_edma_desc *edesc;
157156
struct dma_slave_config cfg;

drivers/dma/fsl-edma-main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec,
114114
if (chan) {
115115
chan->device->privatecnt++;
116116
fsl_chan = to_fsl_edma_chan(chan);
117-
fsl_chan->slave_id = dma_spec->args[1];
118-
fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id,
117+
fsl_chan->srcid = dma_spec->args[1];
118+
fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid,
119119
true);
120120
mutex_unlock(&fsl_edma->fsl_edma_mutex);
121121
return chan;
@@ -540,7 +540,7 @@ static int fsl_edma_probe(struct platform_device *pdev)
540540

541541
fsl_chan->edma = fsl_edma;
542542
fsl_chan->pm_state = RUNNING;
543-
fsl_chan->slave_id = 0;
543+
fsl_chan->srcid = 0;
544544
fsl_chan->idle = true;
545545
fsl_chan->dma_dir = DMA_NONE;
546546
fsl_chan->vchan.desc_free = fsl_edma_free_desc;
@@ -682,8 +682,8 @@ static int fsl_edma_resume_early(struct device *dev)
682682
continue;
683683
fsl_chan->pm_state = RUNNING;
684684
edma_write_tcdreg(fsl_chan, 0, csr);
685-
if (fsl_chan->slave_id != 0)
686-
fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id, true);
685+
if (fsl_chan->srcid != 0)
686+
fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid, true);
687687
}
688688

689689
if (!(fsl_edma->drvdata->flags & FSL_EDMA_DRV_SPLIT_REG))

drivers/dma/mcf-edma-main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
195195
struct fsl_edma_chan *mcf_chan = &mcf_edma->chans[i];
196196

197197
mcf_chan->edma = mcf_edma;
198-
mcf_chan->slave_id = i;
198+
mcf_chan->srcid = i;
199199
mcf_chan->idle = true;
200200
mcf_chan->dma_dir = DMA_NONE;
201201
mcf_chan->vchan.desc_free = fsl_edma_free_desc;
@@ -277,7 +277,7 @@ bool mcf_edma_filter_fn(struct dma_chan *chan, void *param)
277277
if (chan->device->dev->driver == &mcf_edma_driver.driver) {
278278
struct fsl_edma_chan *mcf_chan = to_fsl_edma_chan(chan);
279279

280-
return (mcf_chan->slave_id == (uintptr_t)param);
280+
return (mcf_chan->srcid == (uintptr_t)param);
281281
}
282282

283283
return false;

0 commit comments

Comments
 (0)