diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-12-01 13:35:25 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-01-06 17:38:30 +0300 |
commit | 46fb883c3d0d8a823ef995ddb1f9b0817dea6882 (patch) | |
tree | 92adebeb446051449b7c25c25e38316e20423a1b /drivers/gpu/drm/ast/ast_post.c | |
parent | cf9a4be47fd14473b4d0dd6f494ed7279c2bc8a0 (diff) | |
download | linux-46fb883c3d0d8a823ef995ddb1f9b0817dea6882.tar.xz |
drm/ast: Remove references to struct drm_device.pdev
Using struct drm_device.pdev is deprecated. Convert ast to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-4-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_post.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_post.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c index 8902c2f84bf9..0607658dde51 100644 --- a/drivers/gpu/drm/ast/ast_post.c +++ b/drivers/gpu/drm/ast/ast_post.c @@ -71,6 +71,7 @@ static void ast_set_def_ext_reg(struct drm_device *dev) { struct ast_private *ast = to_ast_private(dev); + struct pci_dev *pdev = to_pci_dev(dev->dev); u8 i, index, reg; const u8 *ext_reg_info; @@ -80,7 +81,7 @@ ast_set_def_ext_reg(struct drm_device *dev) if (ast->chip == AST2300 || ast->chip == AST2400 || ast->chip == AST2500) { - if (dev->pdev->revision >= 0x20) + if (pdev->revision >= 0x20) ext_reg_info = extreginfo_ast2300; else ext_reg_info = extreginfo_ast2300a0; @@ -366,11 +367,12 @@ static void ast_init_dram_reg(struct drm_device *dev) void ast_post_gpu(struct drm_device *dev) { struct ast_private *ast = to_ast_private(dev); + struct pci_dev *pdev = to_pci_dev(dev->dev); u32 reg; - pci_read_config_dword(dev->pdev, 0x04, ®); + pci_read_config_dword(pdev, 0x04, ®); reg |= 0x3; - pci_write_config_dword(dev->pdev, 0x04, reg); + pci_write_config_dword(pdev, 0x04, reg); ast_enable_vga(dev); ast_open_key(ast); |