[PATCH] drm/drv: Make use of local variable driver in drm_dev_register()

Daniel Vetter daniel at ffwll.ch
Thu Jan 5 14:33:13 UTC 2023


On Tue, Dec 20, 2022 at 08:24:18AM +0100, Thomas Zimmermann wrote:
> Hi
> 
> Am 19.12.22 um 19:31 schrieb Uwe Kleine-König:
> > There is a local variable that contains dev->driver. Make use of it
> > instead of "open coding" it.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> 
> Added to drm-misc-next. Thanks a lot.

Given that Uwe has a pile of drm commits all over, time for drm-misc
commit rights?

https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc
-Daniel

> 
> Best regards
> Thomas
> 
> > ---
> >   drivers/gpu/drm/drm_drv.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 203bf8d6c34c..3cc8e8111d16 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -889,8 +889,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> >   	dev->registered = true;
> > -	if (dev->driver->load) {
> > -		ret = dev->driver->load(dev, flags);
> > +	if (driver->load) {
> > +		ret = driver->load(dev, flags);
> >   		if (ret)
> >   			goto err_minors;
> >   	}
> > 
> > base-commit: 678e5b2258e871b22fe8c26edac2723feb852a47
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Ivo Totev




-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list