Re: [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device()

From: Andy Shevchenko

Date: Wed Nov 04 2026 - 03:48:04 EST


On Tue, Nov 03, 2026 at 04:59:45PM -0500, Frank.Li@xxxxxxxxxxx wrote:
>
> Use the dmaengine_get_provider_device() API instead of directly
> accessing chan->device->dev to get the DMA provider device.
>
> No functional change. Prepare make to struct dma_device private to the DMA
> engine.

...

> static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
> {
> - return param == chan->device->dev;
> + return param == dmaengine_get_provider_device(chan);
> }

As mentioned in SPI patch, with another helper this function will gone.

...

> if ((chan->chan_id == param->chan_id) && (param->dma_dev ==
> - chan->device->dev)) {
> + dmaengine_get_provider_device(chan))) {

Fix indentation while at it.

if ((chan->chan_id == param->chan_id) &&
(param->dma_dev == dmaengine_get_provider_device(chan))) {

> chan->private = param;
> return true;

--
With Best Regards,
Andy Shevchenko