[Intel-gfx] [PATCH 14/23] drm/i915: Attach the pci match data to the device upon creation

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 5 13:58:26 UTC 2018


Quoting Michal Wajdeczko (2018-09-05 14:36:13)
> On Tue, 04 Sep 2018 23:57:33 +0200, Chris Wilson  
> <chris at chris-wilson.co.uk> wrote:
> 
> > Attach our device_info to the our i915 private on creation so that it is
> > always available for inspection.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> > @@ -1426,7 +1437,6 @@ int i915_driver_load(struct pci_dev *pdev, const  
> > struct pci_device_id *ent)
> >  out_fini:
> >       i915_load_error(dev_priv, "Device initialization failed (%d)\n", ret);
> >       drm_dev_fini(&dev_priv->drm);
> > -out_free:
> >       kfree(dev_priv);
> >       pci_set_drvdata(pdev, NULL);
> 
> I think you want drm_dev_fini, kfree and pci_set_drvdata to be moved to
> 
>         void i915_driver_destroy(i915) { ... }
> 
> to keep symmetry with just added _create_ function.

Sounds reasonable. i915_driver_release becomes
	cleanup_early;
	driver_destroy.

Naming there feels a little wonky.
-Chris


More information about the Intel-gfx mailing list