diff options
-rw-r--r-- | bsd-core/drm_drv.c | 14 | ||||
-rw-r--r-- | bsd/drm_drv.h | 14 | ||||
-rw-r--r-- | bsd/i830_drv.c | 3 |
3 files changed, 21 insertions, 10 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 186cb567..37485563 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -225,9 +225,10 @@ static int DRM(probe)(device_t dev) const char *s = NULL; int pciid, vendor, device; + /* Cope with agp bridge device? */ - if (!strcmp(device_get_name(dev), "drm")) + if (!strcmp(device_get_name(dev), "drmsub")) pciid = pci_get_devid(device_get_parent(dev)); else pciid = pci_get_devid(dev); @@ -263,8 +264,13 @@ static device_method_t DRM(methods)[] = { { 0, 0 } }; + +#ifndef DRM_DEV_NAME +#define DRM_DEV_NAME "drm" +#endif + static driver_t DRM(driver) = { - "drm", + DRM_DEV_NAME, DRM(methods), sizeof(drm_device_t), }; @@ -660,9 +666,7 @@ static int DRM(init)( device_t nbdev ) dev = device_get_softc(nbdev); memset( (void *)dev, 0, sizeof(*dev) ); - printf("%s: %s\n", __FUNCTION__, device_get_name(nbdev)); - - if (!strcmp(device_get_name(nbdev), "drm")) + if (!strcmp(device_get_name(nbdev), "drmsub")) dev->device = device_get_parent(nbdev); else dev->device = nbdev; diff --git a/bsd/drm_drv.h b/bsd/drm_drv.h index 186cb567..37485563 100644 --- a/bsd/drm_drv.h +++ b/bsd/drm_drv.h @@ -225,9 +225,10 @@ static int DRM(probe)(device_t dev) const char *s = NULL; int pciid, vendor, device; + /* Cope with agp bridge device? */ - if (!strcmp(device_get_name(dev), "drm")) + if (!strcmp(device_get_name(dev), "drmsub")) pciid = pci_get_devid(device_get_parent(dev)); else pciid = pci_get_devid(dev); @@ -263,8 +264,13 @@ static device_method_t DRM(methods)[] = { { 0, 0 } }; + +#ifndef DRM_DEV_NAME +#define DRM_DEV_NAME "drm" +#endif + static driver_t DRM(driver) = { - "drm", + DRM_DEV_NAME, DRM(methods), sizeof(drm_device_t), }; @@ -660,9 +666,7 @@ static int DRM(init)( device_t nbdev ) dev = device_get_softc(nbdev); memset( (void *)dev, 0, sizeof(*dev) ); - printf("%s: %s\n", __FUNCTION__, device_get_name(nbdev)); - - if (!strcmp(device_get_name(nbdev), "drm")) + if (!strcmp(device_get_name(nbdev), "drmsub")) dev->device = device_get_parent(nbdev); else dev->device = nbdev; diff --git a/bsd/i830_drv.c b/bsd/i830_drv.c index 468a276e..683bf83c 100644 --- a/bsd/i830_drv.c +++ b/bsd/i830_drv.c @@ -29,6 +29,9 @@ * $FreeBSD: src/sys/dev/drm/i830_drv.c,v 1.6 2003/04/25 01:18:46 anholt Exp $ */ + +#define DRM_DEV_NAME "drmsub" + #include "i830.h" #include "drmP.h" #include "drm.h" |