|
@@ -530,7 +530,8 @@ static int dev_unload(struct drm_device *dev)
|
|
|
|
|
|
drm_kms_helper_poll_fini(dev);
|
|
drm_kms_helper_poll_fini(dev);
|
|
|
|
|
|
- omap_fbdev_free(dev);
|
|
|
|
|
|
+ if (priv->fbdev)
|
|
|
|
+ omap_fbdev_free(dev);
|
|
|
|
|
|
/* flush crtcs so the fbs get released */
|
|
/* flush crtcs so the fbs get released */
|
|
for (i = 0; i < priv->num_crtcs; i++)
|
|
for (i = 0; i < priv->num_crtcs; i++)
|
|
@@ -599,9 +600,11 @@ static void dev_lastclose(struct drm_device *dev)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
|
|
|
|
- if (ret)
|
|
|
|
- DBG("failed to restore crtc mode");
|
|
|
|
|
|
+ if (priv->fbdev) {
|
|
|
|
+ ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
|
|
|
|
+ if (ret)
|
|
|
|
+ DBG("failed to restore crtc mode");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
static void dev_preclose(struct drm_device *dev, struct drm_file *file)
|
|
static void dev_preclose(struct drm_device *dev, struct drm_file *file)
|