Skip to content

Commit

Permalink
emulators/virtualbox-ose-additions-legacy: Remove devclass from DRIVE…
Browse files Browse the repository at this point in the history
…R_MODULE on recent main.

Reviewed by:	madpilot
Differential Revision:	https://reviews.freebsd.org/D35953
  • Loading branch information
bsdjhb committed Aug 22, 2022
1 parent 3796767 commit b1d42f8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
@@ -1,4 +1,4 @@
--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2020-05-13 19:37:01 UTC
--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2020-07-09 16:50:06 UTC
+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
@@ -102,8 +102,6 @@ struct VBoxGuestDeviceState
struct resource *pIrqRes;
Expand Down Expand Up @@ -184,7 +184,7 @@
* I/O control request.
*
* @returns depends...
@@ -301,8 +210,12 @@ static int vgdrvFreeBSDClose(struct cdev *pDev, int fF
@@ -301,8 +210,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long
static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd)
{
PVBOXGUESTSESSION pSession;
Expand All @@ -198,7 +198,7 @@
/*
* Deal with the fast ioctl path first.
*/
@@ -497,12 +410,14 @@ int VBOXCALL VBoxGuestIDC(void *pvSession, uintptr_t u
@@ -497,12 +410,14 @@ static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEv

static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEvents, struct thread *td)
{
Expand Down Expand Up @@ -257,3 +257,16 @@
vgdrvFreeBSDRemoveIRQ(pDevice, pState);
}
else
@@ -753,8 +668,12 @@ static driver_t vgdrvFreeBSDDriver =
sizeof(struct VBoxGuestDeviceState),
};

+#if __FreeBSD_version >= 1400058
+DRIVER_MODULE(vboxguest, pci, vgdrvFreeBSDDriver, 0, 0);
+#else
static devclass_t vgdrvFreeBSDClass;

DRIVER_MODULE(vboxguest, pci, vgdrvFreeBSDDriver, vgdrvFreeBSDClass, 0, 0);
+#endif
MODULE_VERSION(vboxguest, 1);

@@ -0,0 +1,17 @@
--- src/VBox/Additions/freebsd/drm/vboxvideo_drm.c.orig 2022-07-26 17:36:57 UTC
+++ src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
@@ -154,10 +154,14 @@ static driver_t vboxvideo_driver = {
sizeof(struct drm_device)
};

+#if __FreeBSD_version >= 1400058
+DRIVER_MODULE(vboxvideo, vgapci, vboxvideo_driver, 0, 0);
+#else
extern devclass_t drm_devclass;
#if __FreeBSD_version >= 700010
DRIVER_MODULE(vboxvideo, vgapci, vboxvideo_driver, drm_devclass, 0, 0);
#else
DRIVER_MODULE(vboxvideo, pci, vboxvideo_driver, drm_devclass, 0, 0);
+#endif
#endif
MODULE_DEPEND(vboxvideo, drm, 1, 1, 1);

0 comments on commit b1d42f8

Please sign in to comment.