Re: [PATCH v9 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA

Vinod Koul
2021-06-16T04:15:15Z

On 15-06-21, 16:50, Sanjay R Mehta wrote:

> >> +static struct pt_device *pt_alloc_struct(struct device *dev)
> >> +{
> >> + struct pt_device *pt;
> >> +
> >> + pt = devm_kzalloc(dev, sizeof(*pt), GFP_KERNEL);
> >> +
> >> + if (!pt)
> >> + return NULL;
> >> + pt->dev = dev;
> >> + pt->ord = atomic_inc_return(&pt_ordinal);
> >
> > What is the use of this number?
> >
>
> There are eight similar instances of this DMA engine on AMD SOC.
> It is to differentiate each of these instances.

Are they individual device objects?

--
~Vinod