On Wed, Oct 02, 2013 at 11:23:35AM +0200, David Herrmann wrote: > All bus drivers do device setup themselves. This requires us to adjust all > of them if we introduce new core features. Thus, merge all these into a > uniform drm_dev_register() helper. > > Note that this removes the drm_lastclose() error path for AGP as it is > horribly broken. Moreover, no bus driver called this in any other error > path either. Instead, we use the recently introduced AGP cleanup helpers. > > We also keep a DRIVER_MODESET condition around pci_set_drvdata() to keep > semantics. > > Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxx> [snip] > +int drm_dev_register(struct drm_device *dev) > +{ > + int ret; > + > + mutex_lock(&drm_global_mutex); > + > + if (dev->driver->bus->agp_init) { > + ret = dev->driver->bus->agp_init(dev); > + if (ret) > + goto out_unlock; > + } Imo this should stay in drm_get_pci_dev since its pci specific - no other bus type should ever bother with this really. Looks good otherwise. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel