From 1bb72532ac260a2d3982b40bdd4c936d779d0d16 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Wed, 2 Oct 2013 11:23:34 +0200 Subject: drm: add drm_dev_alloc() helper Instead of managing device allocation+initialization in each bus-driver, we should do that in a central place. drm_fill_in_dev() already does most of it, but also requires the global drm lock for partial AGP device registration. Split both apart so we have a clean device initialization/allocation phase, and a registration phase. Signed-off-by: David Herrmann Signed-off-by: Dave Airlie --- include/drm/drmP.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/drm/drmP.h') diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 69dd5fd5b215..ea545b5ad467 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1643,6 +1643,8 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) extern int drm_fill_in_dev(struct drm_device *dev, const struct pci_device_id *ent, struct drm_driver *driver); +struct drm_device *drm_dev_alloc(struct drm_driver *driver, + struct device *parent); int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type); /*@}*/ -- cgit v1.2.3