> -----Original Message-----
> From: Leon Romanovsky <l...@kernel.org>
> Sent: Tuesday, October 6, 2020 10:03 AM
> To: Pierre-Louis Bossart <pierre-louis.boss...@linux.intel.com>
> Cc: Ertman, David M <david.m.ert...@intel.com>; alsa-devel@alsa-
> project.org; pa...@mellanox.com; ti...@suse.de; netdev@vger.kernel.org;
> ranjani.sridha...@linux.intel.com; fred...@linux.intel.com; linux-
> r...@vger.kernel.org; dledf...@redhat.com; broo...@kernel.org;
> j...@nvidia.com; gre...@linuxfoundation.org; k...@kernel.org; Williams,
> Dan J <dan.j.willi...@intel.com>; Saleem, Shiraz
> <shiraz.sal...@intel.com>; da...@davemloft.net; Patil, Kiran
> <kiran.pa...@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

Reply via email to