[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025020548-fringe-humbly-3ceb@gregkh>
Date: Wed, 5 Feb 2025 09:58:21 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Lyude Paul <lyude@...hat.com>, linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Alexander Lobakin <aleksander.lobakin@...el.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Liam Girdwood <lgirdwood@...il.com>, Lukas Wunner <lukas@...ner.de>,
Mark Brown <broonie@...nel.org>,
MaĆra Canal <mairacanal@...eup.net>,
Robin Murphy <robin.murphy@....com>,
Simona Vetter <simona.vetter@...ll.ch>,
Zijun Hu <quic_zijuhu@...cinc.com>, linux-usb@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 1/5] driver core: add a faux bus for use when a simple
device/bus is needed
On Wed, Feb 05, 2025 at 09:57:32AM +0200, Andy Shevchenko wrote:
> On Wed, Feb 05, 2025 at 06:53:09AM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Feb 04, 2025 at 06:10:36PM -0500, Lyude Paul wrote:
> > > On Tue, 2025-02-04 at 12:09 +0100, Greg Kroah-Hartman wrote:
>
> ...
>
> > > Should we add faux_get_drvdata()/faux_set_drvdata() since we've got a
> > > probe/remove function? Doesn't really look like the platform driver equivalent
> > > does mcuh, but I assume just having an inline function for this would make
> > > things a little less confusing for users.
> >
> > You already have a reference counted object returned to you, why do you
> > need to increment/decrement it again? All of the users I've found in
> > the kernel so far didn't need that, do you have a specific example where
> > it would be useful?
>
> It's about getter and setter for the .driver_data field, I don't see how
> reference counting can help with this.
{sigh}
I saw get and thought get_device() as my coffee hadn't kicked in, my
fault.
You both are right, I'll go add these wrappers.
thanks,
greg k-h
Powered by blists - more mailing lists