[PATCH v2 1/6] Add ancillary bus support

Ertman, David M david.m.ertman at intel.com
Wed Oct 7 22:30:09 CEST 2020


> -----Original Message-----
> From: Leon Romanovsky <leon at kernel.org>
> Sent: Tuesday, October 6, 2020 10:03 AM
> To: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> Cc: Ertman, David M <david.m.ertman at intel.com>; alsa-devel at alsa-
> project.org; parav at mellanox.com; tiwai at suse.de; netdev at vger.kernel.org;
> ranjani.sridharan at linux.intel.com; fred.oh at linux.intel.com; linux-
> rdma at vger.kernel.org; dledford at redhat.com; broonie at kernel.org;
> jgg at nvidia.com; gregkh at linuxfoundation.org; kuba at kernel.org; Williams,
> Dan J <dan.j.williams at intel.com>; Saleem, Shiraz
> <shiraz.saleem at intel.com>; davem at davemloft.net; Patil, Kiran
> <kiran.patil at intel.com>
> Subject: Re: [PATCH v2 1/6] Add ancillary bus support
> 
> On Tue, Oct 06, 2020 at 10:18:07AM -0500, Pierre-Louis Bossart wrote:
> > Thanks for the review Leon.

[...]

> > > > +EXPORT_SYMBOL_GPL(__ancillary_device_add);
> > > > +
> > > > +static int ancillary_probe_driver(struct device *dev)
> > > > +{
> > > > +	struct ancillary_driver *ancildrv = to_ancillary_drv(dev->driver);
> > > > +	struct ancillary_device *ancildev = to_ancillary_dev(dev);
> > > > +	int ret;
> > > > +
> > > > +	ret = dev_pm_domain_attach(dev, true);
> > > > +	if (ret) {
> > > > +		dev_warn(dev, "Failed to attach to PM Domain : %d\n", ret);
> > > > +		return ret;
> > > > +	}
> > > > +
> > > > +	ret = ancildrv->probe(ancildev, ancillary_match_id(ancildrv-
> >id_table, ancildev));
> > >
> > > I don't think that you need to call ->probe() if ancillary_match_id()
> > > returned NULL and probably that check should be done before
> > > dev_pm_domain_attach().
> >
> > we'll look into this.
> >

AKAIK, this callback is only accessed from the bus subsystem after a successful
return from ancillary_match().

-DaveE


More information about the Alsa-devel mailing list