This is the opposite function of drm_mode_group_init. It will be needed to properly cleanup the render node after removing it. Signed-off-by: Ilija Hadzic <ihadzic@xxxxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_crtc.c | 10 ++++++++++ include/drm/drm_crtc.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 1e0ff2d..9af822b 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -946,6 +946,16 @@ int drm_mode_group_init(struct drm_mode_group *group, int total_objects) } EXPORT_SYMBOL(drm_mode_group_init); +void drm_mode_group_fini(struct drm_mode_group *group) +{ + kfree(group->id_list); + group->id_list = NULL; + group->num_crtcs = 0; + group->num_connectors = 0; + group->num_encoders = 0; +} +EXPORT_SYMBOL(drm_mode_group_fini); + int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group) { diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 2110a82..86f4d9a 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -850,6 +850,7 @@ extern char *drm_get_tv_subconnector_name(int val); extern char *drm_get_tv_select_name(int val); extern void drm_fb_release(struct drm_file *file_priv); extern int drm_mode_group_init(struct drm_mode_group *group, int total_objects); +extern void drm_mode_group_fini(struct drm_mode_group *group); extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); extern struct edid *drm_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter); -- 1.7.8.5 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel