Re: [PATCH v4 08/15] soundwire: add initial definitions for sdw_master_device
From: Greg KH
Date: Fri Dec 13 2019 - 16:49:03 EST
On Fri, Dec 13, 2019 at 09:49:57AM -0600, Pierre-Louis Bossart wrote:
> On 12/13/19 1:28 AM, Greg KH wrote:
> > On Thu, Dec 12, 2019 at 11:04:02PM -0600, Pierre-Louis Bossart wrote:
> > > Since we want an explicit support for the SoundWire Master device, add
> > > the definitions, following the Grey Bus example.
> >
> > "Greybus" All one word please.
>
> Ack, will fix.
>
> > > @@ -59,9 +59,12 @@ int sdw_uevent(struct device *dev, struct kobj_uevent_env *env)
> > > if (add_uevent_var(env, "MODALIAS=%s", modalias))
> > > return -ENOMEM;
> > > + } else if (is_sdw_md(dev)) {
> >
> > Ok, "is_sdw_md()" is a horrid function name. Spell it out please, this
> > ends up in the global namespace.
>
> ok, will use is_sdw_master_device.
>
> >
> > Actually, why are you not using module namespaces here for this new
> > code? That would help you out a lot.
>
> I must admit I don't understand the question. This is literally modeled
> after is_gb_host_device(), did I miss something in the Greybus
> implementation?
No, I mean the new MODULE_NAMESPACE() support that is in the kernel.
I'll move the greybus code to use it too, but when you are adding new
apis, it just makes sense to use it then as well.
thanks,
greg k-h