lkml.org 
[lkml]   [2008]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] Clocklib: add generic framework for managing clocks.
Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:
> > > +#ifdef CONFIG_DEBUG_FS
> > > + struct dentry *dir;
> > > + struct dentry *info;
> > > +#endif
> >
> > Can't you hide this in the code, say by wrappering the
> > struct with something else when it is registered?
>
> It is allocated dynamically by drivers. I can move this to
> struct clk_private to specify that it's private, but it should be
> visible outside

Actually, I don't think it _should_ be private. Low-level clock drivers
might want to provide debugfs nodes on their own, and those nodes
naturally belong in the same directory as the clklib ones. So the
debugfs root node must be exposed somehow.

You can get rid of the "info" field if you apply this patch:

http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver-core/debugfs-implement-debugfs_remove_recursive.patch

Haavard


\
 
 \ /
  Last update: 2008-07-04 11:27    [from the cache]
©2003-2011 Jasper Spaans