[RFC 1/2] core: Add generic object registry implementation

2014-11-07 Thread Andrzej Hajda
On 11/06/2014 10:48 AM, Thierry Reding wrote: > On Wed, Nov 05, 2014 at 05:00:47PM +0100, Andrzej Hajda wrote: >> On 11/05/2014 03:04 PM, Thierry Reding wrote: >>> On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: On 11/04/2014 05:29 PM, Thierry Reding wrote: > From: Thierry R

[RFC 1/2] core: Add generic object registry implementation

2014-11-07 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 05:13:24PM +0100, Thierry Reding wrote: > On Thu, Nov 06, 2014 at 11:25:32AM +0100, Thierry Reding wrote: > > On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: > [...] > > > Sure, document it better if you want, but I think something needs to be > > > done

[RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Thu, Nov 06, 2014 at 11:25:32AM +0100, Thierry Reding wrote: > On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: [...] > > Sure, document it better if you want, but I think something needs to be > > done differently if at all possible. > > try_module_get() is the only way I kn

[RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: > On Wed, Nov 05, 2014 at 10:13:53AM +0100, Thierry Reding wrote: > > On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: > > > On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: > > [...] > > > > diff

[RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Wed, Nov 05, 2014 at 05:00:47PM +0100, Andrzej Hajda wrote: > On 11/05/2014 03:04 PM, Thierry Reding wrote: > > On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: > >> On 11/04/2014 05:29 PM, Thierry Reding wrote: > >>> From: Thierry Reding > >>> > >>> Add a generic implementation o

[RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Greg Kroah-Hartman
On Wed, Nov 05, 2014 at 10:13:53AM +0100, Thierry Reding wrote: > On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: > > On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: > [...] > > > diff --git a/drivers/base/registry.c b/drivers/base/registry.c > [...] > > > +/** >

[RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Andrzej Hajda
On 11/05/2014 03:04 PM, Thierry Reding wrote: > On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: >> On 11/04/2014 05:29 PM, Thierry Reding wrote: >>> From: Thierry Reding >>> >>> Add a generic implementation of an object registry. This targets drivers >>> and subsystems that provide

[RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Thierry Reding
On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: > On 11/04/2014 05:29 PM, Thierry Reding wrote: > > From: Thierry Reding > > > > Add a generic implementation of an object registry. This targets drivers > > and subsystems that provide auxiliary objects that other drivers need to > >

[RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Andrzej Hajda
On 11/04/2014 05:29 PM, Thierry Reding wrote: > From: Thierry Reding > > Add a generic implementation of an object registry. This targets drivers > and subsystems that provide auxiliary objects that other drivers need to > look up. The goal is to put the difficult parts (keep object references, >

[RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Thierry Reding
On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: > On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: [...] > > diff --git a/drivers/base/registry.c b/drivers/base/registry.c [...] > > +/** > > + * registry_record_ref - reference on the registry record > > + * @recor

[RFC 1/2] core: Add generic object registry implementation

2014-11-04 Thread Thierry Reding
From: Thierry Reding Add a generic implementation of an object registry. This targets drivers and subsystems that provide auxiliary objects that other drivers need to look up. The goal is to put the difficult parts (keep object references, module usage count, ...) into core code so that individua

[RFC 1/2] core: Add generic object registry implementation

2014-11-04 Thread Greg Kroah-Hartman
On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: > From: Thierry Reding > > Add a generic implementation of an object registry. This targets drivers > and subsystems that provide auxiliary objects that other drivers need to > look up. The goal is to put the difficult parts (keep ob