Re: [PATCH 1/3] Clocklib: add generic framework for managingclocks.

From: Haavard Skinnemoen
Date: Fri Jul 04 2008 - 05:14:31 EST


Dmitry Baryshkov <dbaryshkov@xxxxxxxxx> 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
--
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/