summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-10-07 22:35:31 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-10-07 22:35:31 +0000
commit10b0136796e88448cbc61786aa9afe1ba3743684 (patch)
treeb4a28a309237e61954bec72ef9af954c584f2189 /sys/dev/pci
parentde77aa96dbda64a24a3a51da5d7bd5da3597a63e (diff)
Kill a bunch of #ifdef freebsd/netbsd code in *_drv.c. No binary change.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/i915_drv.c62
-rw-r--r--sys/dev/pci/drm/mach64_drv.c57
-rw-r--r--sys/dev/pci/drm/mga_drv.c57
-rw-r--r--sys/dev/pci/drm/r128_drv.c57
-rw-r--r--sys/dev/pci/drm/radeon_drv.c57
-rw-r--r--sys/dev/pci/drm/savage_drv.c57
-rw-r--r--sys/dev/pci/drm/sis_drv.c57
-rw-r--r--sys/dev/pci/drm/tdfx_drv.c57
-rw-r--r--sys/dev/pci/drm/via_drv.c53
9 files changed, 0 insertions, 514 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index a089a29364d..1ec7703d867 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -92,61 +92,11 @@ static const struct drm_driver_info i915_driver = {
.use_vbl_irq = 1,
};
-#ifdef __FreeBSD__
-static int
-i915_probe(device_t dev)
-{
- return drm_probe(dev, i915_pciidlist);
-}
-
-static int
-i915_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- i915_configure(dev);
- return drm_attach(nbdev, i915_pciidlist);
-}
-
-static device_method_t i915_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, i915_probe),
- DEVMETHOD(device_attach, i915_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t i915_driver = {
-#if __FreeBSD_version >= 700010
- "drm",
-#else
- "drmsub",
-#endif
- i915_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(i915, vgapci, i915_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(i915, agp, i915_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(i915, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int i915drm_probe(struct device *, void *, void *);
void i915drm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
i915drm_probe(struct device *parent, void *match, void *aux)
-#else
-i915drm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, i915_pciidlist);
}
@@ -162,7 +112,6 @@ i915drm_attach(struct device *parent, struct device *self, void *aux)
drm_attach(parent, self, pa, i915_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach inteldrm_ca = {
sizeof(struct drm_device), i915drm_probe, i915drm_attach,
drm_detach, drm_activate
@@ -171,14 +120,3 @@ struct cfattach inteldrm_ca = {
struct cfdriver inteldrm_cd = {
0, "inteldrm", DV_DULL
};
-
-#else
-#ifdef _LKM
-CFDRIVER_DECL(i915drm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(i915drm, sizeof(struct drm_device), i915drm_probe, i915drm_attach,
- drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/mach64_drv.c b/sys/dev/pci/drm/mach64_drv.c
index b6f81bce0dc..96bbffef44e 100644
--- a/sys/dev/pci/drm/mach64_drv.c
+++ b/sys/dev/pci/drm/mach64_drv.c
@@ -92,57 +92,11 @@ static const struct drm_driver_info mach64_driver = {
.use_vbl_irq = 1,
};
-#ifdef __FreeBSD__
-static int
-mach64_probe(device_t dev)
-{
- return drm_probe(dev, mach64_pciidlist);
-}
-
-static int
-mach64_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- mach64_configure(dev);
- return drm_attach(nbdev, mach64_pciidlist);
-}
-
-static device_method_t mach64_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, mach64_probe),
- DEVMETHOD(device_attach, mach64_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t mach64_driver = {
- "drm",
- mach64_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(mach64, vgapci, mach64_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(mach64, pci, mach64_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(mach64, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int mach64drm_probe(struct device *, void *, void *);
void mach64drm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
mach64drm_probe(struct device *parent, void *match, void *aux)
-#else
-mach64drm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, mach64_pciidlist);
}
@@ -158,7 +112,6 @@ mach64drm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, mach64_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach machdrm_ca = {
sizeof(struct drm_device), mach64drm_probe, mach64drm_attach,
drm_detach, drm_activate
@@ -167,13 +120,3 @@ struct cfattach machdrm_ca = {
struct cfdriver machdrm_cd = {
0, "machdrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(mach64drm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(mach64drm, sizeof(struct drm_device), mach64drm_probe,
- mach64drm_attach, drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/mga_drv.c b/sys/dev/pci/drm/mga_drv.c
index 6501e54a154..28041bbb409 100644
--- a/sys/dev/pci/drm/mga_drv.c
+++ b/sys/dev/pci/drm/mga_drv.c
@@ -141,56 +141,10 @@ static const struct drm_driver_info mga_driver = {
.use_vbl_irq = 1,
};
-#ifdef __FreeBSD__
-static int
-mga_probe(device_t dev)
-{
- return drm_probe(dev, mga_pciidlist);
-}
-
-static int
-mga_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- mga_configure(dev);
- return drm_attach(nbdev, mga_pciidlist);
-}
-
-static device_method_t mga_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, mga_probe),
- DEVMETHOD(device_attach, mga_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t mga_driver = {
- "drm",
- mga_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(mga, vgapci, mga_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(mga, pci, mga_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(mga, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int mgadrm_probe(struct device *, void *, void *);
void mgadrm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
mgadrm_probe(struct device *parent, void *match, void *aux)
-#else
-mgadrm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, mga_pciidlist);
}
@@ -205,7 +159,6 @@ mgadrm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, mga_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach mgadrm_ca = {
sizeof(struct drm_device), mgadrm_probe, mgadrm_attach,
drm_detach, drm_activate
@@ -214,13 +167,3 @@ struct cfattach mgadrm_ca = {
struct cfdriver mgadrm_cd = {
0, "mgadrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(mgadrm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(mgadrm, sizeof(struct drm_device), mgadrm_probe, mgadrm_attach,
- drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/r128_drv.c b/sys/dev/pci/drm/r128_drv.c
index 3c3b1b0ee57..ea38a097e31 100644
--- a/sys/dev/pci/drm/r128_drv.c
+++ b/sys/dev/pci/drm/r128_drv.c
@@ -94,57 +94,11 @@ static const struct drm_driver_info r128_driver = {
.use_vbl_irq = 1,
};
-#ifdef __FreeBSD__
-static int
-r128_probe(device_t dev)
-{
- return drm_probe(dev, r128_pciidlist);
-}
-
-static int
-r128_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- r128_configure(dev);
- return drm_attach(nbdev, r128_pciidlist);
-}
-
-static device_method_t r128_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, r128_probe),
- DEVMETHOD(device_attach, r128_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t r128_driver = {
- "drm",
- r128_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(r128, vgapci, r128_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(r128, pci, r128_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(r128, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int r128drm_probe(struct device *, void *, void *);
void r128drm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
r128drm_probe(struct device *parent, void *match, void *aux)
-#else
-r128drm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, r128_pciidlist);
}
@@ -159,7 +113,6 @@ r128drm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, r128_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach ragedrm_ca = {
sizeof(struct drm_device), r128drm_probe, r128drm_attach,
drm_detach, drm_activate
@@ -168,13 +121,3 @@ struct cfattach ragedrm_ca = {
struct cfdriver ragedrm_cd = {
0, "ragedrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(r128drm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(r128drm, sizeof(struct drm_device), r128drm_probe, r128drm_attach,
- drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/radeon_drv.c b/sys/dev/pci/drm/radeon_drv.c
index 48938b607d2..227f59ed262 100644
--- a/sys/dev/pci/drm/radeon_drv.c
+++ b/sys/dev/pci/drm/radeon_drv.c
@@ -109,57 +109,11 @@ static const struct drm_driver_info radeon_driver = {
.use_vbl_irq = 1,
};
-#ifdef __FreeBSD__
-static int
-radeon_probe(device_t dev)
-{
- return drm_probe(dev, radeon_pciidlist);
-}
-
-static int
-radeon_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- radeon_configure(dev);
- return drm_attach(nbdev, radeon_pciidlist);
-}
-
-static device_method_t radeon_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, radeon_probe),
- DEVMETHOD(device_attach, radeon_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t radeon_driver = {
- "drm",
- radeon_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(radeon, vgapci, radeon_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(radeon, pci, radeon_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(radeon, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int radeondrm_probe(struct device *, void *, void *);
void radeondrm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
radeondrm_probe(struct device *parent, void *match, void *aux)
-#else
-radeondrm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, radeon_pciidlist);
}
@@ -174,7 +128,6 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, radeon_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach radeondrm_ca = {
sizeof (struct drm_device), radeondrm_probe, radeondrm_attach,
drm_detach, drm_activate
@@ -183,13 +136,3 @@ struct cfattach radeondrm_ca = {
struct cfdriver radeondrm_cd = {
NULL, "radeondrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(radeondrm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(radeondrm, sizeof(struct drm_device), radeondrm_probe,
- radeondrm_attach, drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/savage_drv.c b/sys/dev/pci/drm/savage_drv.c
index 56bee7f35aa..1282aa757b5 100644
--- a/sys/dev/pci/drm/savage_drv.c
+++ b/sys/dev/pci/drm/savage_drv.c
@@ -71,57 +71,11 @@ static const struct drm_driver_info savage_driver = {
.use_dma = 1,
};
-#ifdef __FreeBSD__
-static int
-savage_probe(device_t dev)
-{
- return drm_probe(dev, savage_pciidlist);
-}
-
-static int
-savage_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- savage_configure(dev);
- return drm_attach(nbdev, savage_pciidlist);
-}
-
-static device_method_t savage_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, savage_probe),
- DEVMETHOD(device_attach, savage_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t savage_driver = {
- "drm",
- savage_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(savage, vgapci, savage_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(savage, pci, savage_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(savage, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int savagedrm_probe(struct device *, void *, void *);
void savagedrm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
savagedrm_probe(struct device *parent, void *match, void *aux)
-#else
-savagedrm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, savage_pciidlist);
}
@@ -136,7 +90,6 @@ savagedrm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, savage_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach savagedrm_ca = {
sizeof(struct drm_device), savagedrm_probe, savagedrm_attach,
drm_detach, drm_activate
@@ -145,13 +98,3 @@ struct cfattach savagedrm_ca = {
struct cfdriver savagedrm_cd = {
0, "savagedrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(savagedrm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(savagedrm, sizeof(struct drm_device), savagedrm_probe,
- savagedrm_attach, drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/sis_drv.c b/sys/dev/pci/drm/sis_drv.c
index 14c3d505ddf..a77125a01cf 100644
--- a/sys/dev/pci/drm/sis_drv.c
+++ b/sys/dev/pci/drm/sis_drv.c
@@ -66,57 +66,11 @@ static const struct drm_driver_info sis_driver = {
.use_mtrr = 1,
};
-#ifdef __FreeBSD__
-static int
-sis_probe(device_t dev)
-{
- return drm_probe(dev, sis_pciidlist);
-}
-
-static int
-sis_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- sis_configure(dev);
- return drm_attach(nbdev, sis_pciidlist);
-}
-
-static device_method_t sis_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, sis_probe),
- DEVMETHOD(device_attach, sis_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t sis_driver = {
- "drm",
- sis_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(sisdrm, vgapci, sis_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(sisdrm, pci, sis_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(sisdrm, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int sisdrm_probe(struct device *, void *, void *);
void sisdrm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
sisdrm_probe(struct device *parent, void *match, void *aux)
-#else
-sisdrm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, sis_pciidlist);
}
@@ -131,7 +85,6 @@ sisdrm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, sis_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach sisdrm_ca = {
sizeof(struct drm_device), sisdrm_probe, sisdrm_attach,
drm_detach, drm_activate
@@ -140,13 +93,3 @@ struct cfattach sisdrm_ca = {
struct cfdriver sisdrm_cd = {
0, "sisdrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(sisdrm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(sisdrm, sizeof(struct drm_device), sisdrm_probe, sisdrm_attach,
- drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/tdfx_drv.c b/sys/dev/pci/drm/tdfx_drv.c
index 9afd3a7855a..0a8f5b8d61d 100644
--- a/sys/dev/pci/drm/tdfx_drv.c
+++ b/sys/dev/pci/drm/tdfx_drv.c
@@ -56,57 +56,11 @@ static const struct drm_driver_info tdfx_driver = {
.use_mtrr = 1,
};
-#ifdef __FreeBSD__
-static int
-tdfx_probe(device_t dev)
-{
- return drm_probe(dev, tdfx_pciidlist);
-}
-
-static int
-tdfx_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- tdfx_configure(dev);
- return drm_attach(nbdev, tdfx_pciidlist);
-}
-
-static device_method_t tdfx_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, tdfx_probe),
- DEVMETHOD(device_attach, tdfx_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t tdfx_driver = {
- "drm",
- tdfx_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(tdfx, vgapci, tdfx_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(tdfx, pci, tdfx_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(tdfx, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int tdfxdrm_probe(struct device *, void *, void *);
void tdfxdrm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
tdfxdrm_probe(struct device *parent, void *match, void *aux)
-#else
-tdfxdrm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, tdfx_pciidlist);
}
@@ -121,7 +75,6 @@ tdfxdrm_attach(struct device *parent, struct device *self, void *aux)
return drm_attach(parent, self, pa, tdfx_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach tdfxdrm_ca = {
sizeof(struct drm_device), tdfxdrm_probe, tdfxdrm_attach,
drm_detach, drm_activate
@@ -130,13 +83,3 @@ struct cfattach tdfxdrm_ca = {
struct cfdriver tdfxdrm_cd = {
0, "tdfxdrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(tdfxdrm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(tdfxdrm, sizeof(struct drm_device), tdfxdrm_probe, tdfxdrm_attach,
- drm_detach, drm_activate);
-#endif
-#endif
-
-#endif
diff --git a/sys/dev/pci/drm/via_drv.c b/sys/dev/pci/drm/via_drv.c
index a90d7ea3e8e..92d73b9ee1d 100644
--- a/sys/dev/pci/drm/via_drv.c
+++ b/sys/dev/pci/drm/via_drv.c
@@ -87,53 +87,11 @@ static const struct drm_driver_info via_driver = {
.use_vbl_irq = 1,
};
-#ifdef __FreeBSD__
-static int
-via_probe(device_t dev)
-{
- return drm_probe(dev, via_pciidlist);
-}
-
-static int
-via_attach(device_t nbdev)
-{
- struct drm_device *dev = device_get_softc(nbdev);
-
- bzero(dev, sizeof(struct drm_device));
- via_configure(dev);
- return drm_attach(nbdev, via_pciidlist);
-}
-
-static device_method_t via_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, via_probe),
- DEVMETHOD(device_attach, via_attach),
- DEVMETHOD(device_detach, drm_detach),
-
- { 0, 0 }
-};
-
-static driver_t via_driver = {
- "drm",
- via_methods,
- sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-DRIVER_MODULE(via, pci, via_driver, drm_devclass, 0, 0);
-MODULE_DEPEND(via, drm, 1, 1, 1);
-
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
-
int viadrm_probe(struct device *, void *, void *);
void viadrm_attach(struct device *, struct device *, void *);
int
-#if defined(__OpenBSD__)
viadrm_probe(struct device *parent, void *match, void *aux)
-#else
-viadrm_probe(struct device *parent, struct cfdata *match, void *aux)
-#endif
{
return drm_probe((struct pci_attach_args *)aux, via_pciidlist);
}
@@ -148,7 +106,6 @@ viadrm_attach(struct device *parent, struct device *self, void *opaque)
drm_attach(parent, self, pa, via_pciidlist);
}
-#if defined(__OpenBSD__)
struct cfattach viadrm_ca = {
sizeof(struct drm_device), viadrm_probe, viadrm_attach,
drm_detach, drm_activate
@@ -157,13 +114,3 @@ struct cfattach viadrm_ca = {
struct cfdriver viadrm_cd = {
0, "viadrm", DV_DULL
};
-#else
-#ifdef _LKM
-CFDRIVER_DECL(viadrm, DV_TTY, NULL);
-#else
-CFATTACH_DECL(viadrm, sizeof(struct drm_device), viadrm_probe, viadrm_attach,
- drm_detach, drm_activate);
-#endif
-#endif
-
-#endif