Re: [PATCH 47/48] drm: omapdrm: dss: Store the debugfs root directory in struct dss_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

On Wednesday, 18 October 2017 01:16:53 EEST Sebastian Reichel wrote:
> Hi,
> 
> On Fri, Oct 13, 2017 at 05:59:43PM +0300, Laurent Pinchart wrote:
> > As part of an effort to remove the usage of global variables in the
> > driver, store the debugfs root directory in the dss_device structure
> > instead of a global variable.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> > ---
> > 
> >  drivers/gpu/drm/omapdrm/dss/dispc.c |  2 +-
> >  drivers/gpu/drm/omapdrm/dss/dsi.c   |  8 ++++----
> >  drivers/gpu/drm/omapdrm/dss/dss.c   | 39 +++++++++++++++++---------------
> >  drivers/gpu/drm/omapdrm/dss/dss.h   |  9 ++++++---
> >  drivers/gpu/drm/omapdrm/dss/hdmi4.c |  3 ++-
> >  drivers/gpu/drm/omapdrm/dss/hdmi5.c |  3 ++-
> >  drivers/gpu/drm/omapdrm/dss/venc.c  |  3 ++-
> >  7 files changed, 37 insertions(+), 30 deletions(-)

[snip]

> > diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c
> > b/drivers/gpu/drm/omapdrm/dss/dss.c index 5d927dfe0a7f..f4e15850cc9d
> > 100644
> > --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> > +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> > @@ -906,25 +906,23 @@ static int dss_debug_dump_clocks(struct seq_file *s,
> > void *p)
> >  	return 0;
> >  }
> > 
> > -static struct dentry *dss_debugfs_dir;
> > -
> >  static int dss_initialize_debugfs(struct dss_device *dss)
> >  {
> > -	dss_debugfs_dir = debugfs_create_dir("omapdss", NULL);
> > -	if (IS_ERR(dss_debugfs_dir)) {
> > -		int err = PTR_ERR(dss_debugfs_dir);
> > +	static struct dentry *dir;
> 
> static?

Oops. Will fix in v2. Thanks for catching it.

> Otherwise:
> 
> Reviewed-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxxxx>
> 
> -- Sebastian
> 
> > -		dss_debugfs_dir = NULL;
> > -		return err;
> > -	}
> > +	dir = debugfs_create_dir("omapdss", NULL);
> > +	if (IS_ERR(dir))
> > +		return PTR_ERR(dir);
> > +
> > +	dss->debugfs.root = dir;
> >  	return 0;
> >  }

[snip]

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux