Re: [PATCH 3/6] iio: buffer-dma: Turn iio_dma_buffer_init() void

Nuno Sá
2026-01-02T10:24:41Z

On Sat, 2025-12-27 at 16:02 +0200, Andy Shevchenko wrote:
> On Fri, Dec 19, 2025 at 5:03 PM Nuno Sá <noname.nuno@gmail.com> wrote:
> > On Wed, 2025-12-03 at 18:34 +0200, Andy Shevchenko wrote:
> > > On Wed, Dec 03, 2025 at 03:11:38PM +0000, Nuno Sá via B4 Relay wrote:
>
> ...
>
> > > > While at it, fix a mismatch between the function declaration and definition
> > > > regarding the struct device (dma_dev != dev).
> > >
> > > So, all others use simple dev?
> >
> > Totally forgot about this. What do you mean by the above? If other functions in the
> > header use just dev? If so, the one I changed is the only one that uses struct device
> > (in that header). It is also consistent with what we have for the devm_iio_dmaengine_*
> > APIs.
>
> Does the device, that is physical, DMA? Or is it a separate device for
> that purpose? I mean that naming may suggest that they are different
> devices. The original Q was about APIs. Are all of them, after your
> patch, use the same device semantically?
>

This device is the DMA capable device which provides the DMA chan which indeed is not the same
as the struct device in the devm APIs (that one is the consumer). So dma_dev might be a better name
even though the docs already make it clear.

- Nuno Sá