summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/tdfx_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/tdfx_drv.c')
-rw-r--r--sys/dev/pci/drm/tdfx_drv.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/tdfx_drv.c b/sys/dev/pci/drm/tdfx_drv.c
index 660eac5ac42..708639f989a 100644
--- a/sys/dev/pci/drm/tdfx_drv.c
+++ b/sys/dev/pci/drm/tdfx_drv.c
@@ -35,6 +35,11 @@
#include "tdfx_drv.h"
#include "drmP.h"
+struct tdfxdrm_softc {
+ struct device dev;
+ struct device *drmdev;
+};
+
int tdfxdrm_probe(struct device *, void *, void *);
void tdfxdrm_attach(struct device *, struct device *, void *);
@@ -64,22 +69,20 @@ static const struct drm_driver_info tdfxdrm_driver = {
int
tdfxdrm_probe(struct device *parent, void *match, void *aux)
{
- return drm_probe((struct pci_attach_args *)aux, tdfxdrm_pciidlist);
+ return drm_pciprobe((struct pci_attach_args *)aux, tdfxdrm_pciidlist);
}
void
tdfxdrm_attach(struct device *parent, struct device *self, void *aux)
{
- struct pci_attach_args *pa = aux;
- struct drm_device *dev = (struct drm_device *)self;
+ struct tdfxdrm_softc *dev_priv = (struct tdfxdrm_softc *)self;
+ struct pci_attach_args *pa = aux;
- dev->driver = &tdfxdrm_driver;
- return drm_attach(parent, self, pa);
+ dev_priv->drmdev = drm_attach_mi(&tdfxdrm_driver, pa, parent, self);
}
struct cfattach tdfxdrm_ca = {
- sizeof(struct drm_device), tdfxdrm_probe, tdfxdrm_attach,
- drm_detach, drm_activate
+ sizeof(struct tdfxdrm_softc), tdfxdrm_probe, tdfxdrm_attach,
};
struct cfdriver tdfxdrm_cd = {