From 7f056c0f9b1975d6e1ff51b16bfc94ae121646e8 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 25 Jul 2003 17:47:55 +0000 Subject: Match new naming of drm subdevice created by agp_i810.c --- bsd-core/drm_drv.c | 14 +++++++++----- bsd/drm_drv.h | 14 +++++++++----- 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" -- cgit v1.2.3