[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6MZ7JdP6tynvYRr@smile.fi.intel.com>
Date: Wed, 5 Feb 2025 09:57:32 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
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 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.
> I'll be glad to add it, I just didn't think anyone would ever call it.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists