Re: [patch 3/17] s390: move s390_root_dev_* out of the cio layer.
From: Martin Schwidefsky
Date: Mon Dec 12 2005 - 04:35:48 EST
On Fri, 2005-12-09 at 23:50 -0800, Greg KH wrote:
> On Fri, Dec 09, 2005 at 05:54:43PM +0100, Martin Schwidefsky wrote:
> > On Fri, 2005-12-09 at 17:51 +0100, Adrian Bunk wrote:
> > > On Fri, Dec 09, 2005 at 04:23:45PM +0100, Martin Schwidefsky wrote:
> > > > +extern struct device *s390_root_dev_register(const char *);
> > > > +extern void s390_root_dev_unregister(struct device *);
> > > >...
> > >
> > > If you do _really_ need these wrappers, simply make them
> > > "static inline"'s in the header file.
> >
> > We can't. The point here is that we need an external release function
> > that is still available after the module has been unloaded that uses
> > these wrappers.
>
> release is find and understandable. But the unregister one is just
> pretty foolish :)
Well, the alternative is to only have a release function somewhere that
calls kfree. Which would be general-purpose "struct device"-kfree
wrapper and would be callable by any piece of code. Where is the
difference to calling kfree directly then? The additional indirection?
No, the release function should be related to a specific object and then
you need the register/unregister functions as well.
--
blue skies,
Martin
Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/