Re: [alsa-devel] [RFC PATCH 5/7] soundwire: add debugfs support

2019-05-06 Thread Greg KH
On Mon, May 06, 2019 at 10:08:10PM +0530, Vinod Koul wrote: > Yes, but then device exit routine is supposed to do debugfs cleanup as > well, so that would ensure these references are dropped at that point of > time. Greg should that not take care of it or we *should* always do > refcounting.

Re: [alsa-devel] [RFC PATCH 5/7] soundwire: add debugfs support

2019-05-06 Thread Pierre-Louis Bossart
On 5/6/19 11:38 AM, Vinod Koul wrote: On 06-05-19, 09:48, Pierre-Louis Bossart wrote: +struct dentry *sdw_bus_debugfs_get_root(struct sdw_bus_debugfs *d) +{ + if (d) + return d->fs; + return NULL; +} +EXPORT_SYMBOL(sdw_bus_debugfs_get_root); _GPL()? Oops, that's a

Re: [alsa-devel] [RFC PATCH 5/7] soundwire: add debugfs support

2019-05-06 Thread Vinod Koul
On 06-05-19, 09:48, Pierre-Louis Bossart wrote: > > > +struct dentry *sdw_bus_debugfs_get_root(struct sdw_bus_debugfs *d) > > > +{ > > > + if (d) > > > + return d->fs; > > > + return NULL; > > > +} > > > +EXPORT_SYMBOL(sdw_bus_debugfs_get_root); > > > > _GPL()? > > Oops, that's a big

Re: [alsa-devel] [RFC PATCH 5/7] soundwire: add debugfs support

2019-05-06 Thread Pierre-Louis Bossart
@@ -136,6 +139,8 @@ static int sdw_delete_slave(struct device *dev, void *data) void sdw_delete_bus_master(struct sdw_bus *bus) { sdw_sysfs_bus_exit(bus); + if (bus->debugfs) + sdw_bus_debugfs_exit(bus->debugfs); No need to check, just call it. That was on