Skip to content

Commit

Permalink
drm/ast: Don't use ast->dev if dev is available
Browse files Browse the repository at this point in the history
Several places in ast use ast->dev, when a dev pointer is already
available within the function. Remove the extra indirection. No
functional changes made.

This is just a small cleanup before embedding the DRM device instance
in struct ast_private.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-6-tzimmermann@suse.de
  • Loading branch information
Thomas Zimmermann committed Aug 3, 2020
1 parent 365c0e7 commit 21d79b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ast/ast_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ int ast_mode_config_init(struct ast_private *ast)
dev->mode_config.min_height = 0;
dev->mode_config.preferred_depth = 24;
dev->mode_config.prefer_shadow = 1;
dev->mode_config.fb_base = pci_resource_start(ast->dev->pdev, 0);
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0);

if (ast->chip == AST2100 ||
ast->chip == AST2200 ||
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/ast/ast_post.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ void ast_post_gpu(struct drm_device *dev)
u32 reg;
struct ast_private *ast = to_ast_private(dev);

pci_read_config_dword(ast->dev->pdev, 0x04, &reg);
pci_read_config_dword(dev->pdev, 0x04, &reg);
reg |= 0x3;
pci_write_config_dword(ast->dev->pdev, 0x04, reg);
pci_write_config_dword(dev->pdev, 0x04, reg);

ast_enable_vga(dev);
ast_open_key(ast);
Expand Down

0 comments on commit 21d79b6

Please sign in to comment.