@@ -60,6 +60,11 @@ static int bochs_load(struct drm_device *dev)
DEFINE_DRM_GEM_FOPS(bochs_fops);
+static void bochs_release(struct drm_device *dev)
+{
+ bochs_unload(dev);
+}
+
static struct drm_driver bochs_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.fops = &bochs_fops,
@@ -69,6 +74,7 @@ static struct drm_driver bochs_driver = {
.major = 1,
.minor = 0,
DRM_GEM_VRAM_DRIVER,
+ .release = bochs_release,
};
/* ---------------------------------------------------------------------- */
@@ -148,9 +154,8 @@ static void bochs_pci_remove(struct pci_dev *pdev)
{
struct drm_device *dev = pci_get_drvdata(pdev);
- drm_atomic_helper_shutdown(dev);
drm_dev_unregister(dev);
- bochs_unload(dev);
+ drm_atomic_helper_shutdown(dev);
drm_dev_put(dev);
}