diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-07-25 17:47:55 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-07-25 17:47:55 +0000 |
commit | 7f056c0f9b1975d6e1ff51b16bfc94ae121646e8 (patch) | |
tree | 407f4bdf7314d05bc908b9226461ffe32d01066d | |
parent | a010f7d99feeeb5ff9b8b29c10885a0287c2b092 (diff) |
Match new naming of drm subdevice created by agp_i810.ci865-agp-0-1-20030728
-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 186cb5670..374855636 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 186cb5670..374855636 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 468a276e7..683bf83cb 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" |