diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-02 13:50:28 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-07 11:12:03 +0200 |
commit | 1728bf6402c3d17da9271b98c5118f9448062ae9 (patch) | |
tree | 8ecae664b51dce517f3b938e20f1ad7746d1c469 | |
parent | c35da0ed48c76512c46e831ff42534646eb34f1a (diff) | |
download | linux-1728bf6402c3d17da9271b98c5118f9448062ae9.tar.bz2 |
drm/ast: Use managed mode-config init
Using drmm_mode_config_init() sets up managed release of modesetting
resources. The existing modesetting's finalizer is empty, so remove it.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-14-tzimmermann@suse.de
-rw-r--r-- | drivers/gpu/drm/ast/ast_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 4 |
3 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index 77226e2fd7c0..ad1d0b14ef12 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -287,7 +287,6 @@ struct ast_crtc_state { #define to_ast_crtc_state(state) container_of(state, struct ast_crtc_state, base) extern int ast_mode_init(struct drm_device *dev); -extern void ast_mode_fini(struct drm_device *dev); #define AST_MM_ALIGN_SHIFT 4 #define AST_MM_ALIGN_MASK ((1 << AST_MM_ALIGN_SHIFT) - 1) diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 2eab19a9056f..2642e6d0152b 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -473,7 +473,9 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) if (ret) goto out_free; - drm_mode_config_init(dev); + ret = drmm_mode_config_init(dev); + if (ret) + goto out_free; dev->mode_config.funcs = (void *)&ast_mode_funcs; dev->mode_config.min_width = 0; @@ -516,8 +518,6 @@ void ast_driver_unload(struct drm_device *dev) ast_release_firmware(dev); kfree(ast->dp501_fw_addr); - ast_mode_fini(dev); - drm_mode_config_cleanup(dev); ast_mm_fini(ast); kfree(ast); diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 43c9686ba0f7..33b4b6f3e394 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -1110,10 +1110,6 @@ int ast_mode_init(struct drm_device *dev) return 0; } -void ast_mode_fini(struct drm_device *dev) -{ -} - static int get_clock(void *i2c_priv) { struct ast_i2c_chan *i2c = i2c_priv; |