static void cirrus_release(struct drm_device *dev)
{
drm_mode_config_cleanup(dev);
- drm_dev_fini(dev);
}
DEFINE_DRM_GEM_FOPS(cirrus_fops);
* struct driver_device *priv = container_of(...);
*
* drm_mode_config_cleanup(drm);
- * drm_dev_fini(drm);
* }
*
* static struct drm_driver driver_drm_driver = {
EXPORT_SYMBOL(devm_drm_dev_init);
/**
- * drm_dev_fini - Finalize a dead DRM device
- * @dev: DRM device
- *
- * Finalize a dead DRM device. This is the converse to drm_dev_init() and
- * frees up all data allocated by it. All driver private data should be
- * finalized first. Note that this function does not free the @dev, that is
- * left to the caller.
- *
- * The ref-count of @dev must be zero, and drm_dev_fini() should only be called
- * from a &drm_driver.release callback.
- */
-void drm_dev_fini(struct drm_device *dev)
-{
-}
-EXPORT_SYMBOL(drm_dev_fini);
-
-/**
* drm_dev_alloc - Allocate new DRM device
* @driver: DRM driver to allocate device for
* @parent: Parent device object
if (dev->driver->release)
dev->driver->release(dev);
- else
- drm_dev_fini(dev);
drm_managed_release(dev);
DRM_DEBUG_DRIVER("\n");
drm_mode_config_cleanup(drm);
- drm_dev_fini(drm);
}
EXPORT_SYMBOL(mipi_dbi_release);
return i915;
}
-static void i915_driver_destroy(struct drm_i915_private *i915)
-{
- drm_dev_fini(&i915->drm);
-}
-
/**
* i915_driver_probe - setup chip and create an initial config
* @pdev: PCI device
pci_disable_device(pdev);
out_fini:
i915_probe_error(i915, "Device initialization failed (%d)\n", ret);
- i915_driver_destroy(i915);
drm_dev_put(&i915->drm);
return ret;
}
intel_runtime_pm_driver_release(rpm);
i915_driver_late_release(dev_priv);
- i915_driver_destroy(dev_priv);
}
static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
drm_mode_config_cleanup(&i915->drm);
- drm_dev_fini(&i915->drm);
out:
put_device(&i915->drm.pdev->dev);
i915->drm.pdev = NULL;
intel_gt_driver_late_release(&i915->gt);
intel_memory_regions_driver_release(i915);
drm_mode_config_cleanup(&i915->drm);
- drm_dev_fini(&i915->drm);
drm_dev_put(&i915->drm);
return NULL;
static void ingenic_drm_release(struct drm_device *drm)
{
drm_mode_config_cleanup(drm);
- drm_dev_fini(drm);
}
static int ingenic_drm_enable_vblank(struct drm_crtc *crtc)
static void mcde_release(struct drm_device *drm)
{
drm_mode_config_cleanup(drm);
- drm_dev_fini(drm);
}
DEFINE_DRM_GEM_CMA_FOPS(drm_fops);
drm_kms_helper_poll_fini(ddev);
tidss_modeset_cleanup(tidss);
-
- drm_dev_fini(ddev);
}
DEFINE_DRM_GEM_CMA_FOPS(tidss_fops);
gm12u320_usb_free(gm12u320);
drm_mode_config_cleanup(dev);
- drm_dev_fini(dev);
}
DEFINE_DRM_GEM_FOPS(gm12u320_fops);
DRM_DEBUG_DRIVER("\n");
drm_mode_config_cleanup(drm);
- drm_dev_fini(drm);
}
static const uint32_t repaper_formats[] = {
{
udl_fini(dev);
udl_modeset_cleanup(dev);
- drm_dev_fini(dev);
}
static struct drm_driver driver = {
struct vgem_device *vgem = container_of(dev, typeof(*vgem), drm);
platform_device_unregister(vgem->platform);
- drm_dev_fini(&vgem->drm);
}
static struct drm_driver vgem_driver = {
platform_device_unregister(vkms->platform);
drm_atomic_helper_shutdown(&vkms->drm);
drm_mode_config_cleanup(&vkms->drm);
- drm_dev_fini(&vkms->drm);
destroy_workqueue(vkms->output.composer_workq);
}
drm_atomic_helper_shutdown(dev);
drm_mode_config_cleanup(dev);
- drm_dev_fini(dev);
-
if (front_info->cfg.be_alloc)
xenbus_switch_state(front_info->xb_dev,
XenbusStateInitialising);
* @release:
*
* Optional callback for destroying device data after the final
- * reference is released, i.e. the device is being destroyed. Drivers
- * using this callback are responsible for calling drm_dev_fini()
- * to finalize the device and then freeing the struct themselves.
+ * reference is released, i.e. the device is being destroyed.
*/
void (*release) (struct drm_device *);
int devm_drm_dev_init(struct device *parent,
struct drm_device *dev,
struct drm_driver *driver);
-void drm_dev_fini(struct drm_device *dev);
struct drm_device *drm_dev_alloc(struct drm_driver *driver,
struct device *parent);