[PATCH 0/6] Ancillary bus implementation and SOF multi-client support

Mark Brown broonie at kernel.org
Fri Oct 2 19:44:35 CEST 2020


On Fri, Oct 02, 2020 at 02:25:58PM -0300, Jason Gunthorpe wrote:
> On Fri, Oct 02, 2020 at 05:23:53PM +0000, Ertman, David M wrote:

> > Would you recommend adding two elements to the ancillary_device like:
> > 	void *ancillary_data;
> > 	u32 ancildata_size;
> > like the platform_device uses?

> That doesn't seem useful here, the intent is to use container_of, if
> the creator wants to pass private data then it should be structured
> into the containing struct.

> platform_devices/etc don't use container_of so have this side band way
> to pass more data.

The other thing platform_data lets you do is keep constant data separate
from dynamic data - if you have to use container_of() then you need to
either allocate a pointer to any constant data in the container or copy
it into the container.  Since the platform_data is in struct device it's
going to be there anyway and may as well get used.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20201002/5e754441/attachment.sig>


More information about the Alsa-devel mailing list