aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast/ast_mode.c
diff options
context:
space:
mode:
authorThomas Zimmermann <[email protected]>2024-09-11 11:51:28 +0000
committerThomas Zimmermann <[email protected]>2024-09-13 13:41:18 +0000
commitc1779a2346fe7d7ea8628e4062afbe6f0db113ed (patch)
treeb828b0d369418a8b07e452918f5b05fada78b530 /drivers/gpu/drm/ast/ast_mode.c
parentdrm/ast: Respect return value from CRTC init (diff)
downloadkernel-c1779a2346fe7d7ea8628e4062afbe6f0db113ed.tar.gz
kernel-c1779a2346fe7d7ea8628e4062afbe6f0db113ed.zip
drm/ast: Avoid upcasting to struct ast_device
Several functions receive an instance of struct drm_device only to upcast it to struct ast_device. Improve type safety by passing the AST device directly. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index f90fade5d681..9d5321c81e68 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -1287,9 +1287,9 @@ static const struct drm_crtc_funcs ast_crtc_funcs = {
.atomic_destroy_state = ast_crtc_atomic_destroy_state,
};
-static int ast_crtc_init(struct drm_device *dev)
+static int ast_crtc_init(struct ast_device *ast)
{
- struct ast_device *ast = to_ast_device(dev);
+ struct drm_device *dev = &ast->base;
struct drm_crtc *crtc = &ast->crtc;
int ret;
@@ -1396,7 +1396,7 @@ int ast_mode_config_init(struct ast_device *ast)
if (ret)
return ret;
- ret = ast_crtc_init(dev);
+ ret = ast_crtc_init(ast);
if (ret)
return ret;