summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mga/mga_state.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2021-05-02 13:49:48 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2021-05-03 20:48:24 +0300
commitb420fb8dee00bda3ac3dc43df28fbc9eccf7f723 (patch)
treeca3849f6803ec5141433959cd596bb9cbcf5eb19 /drivers/gpu/drm/mga/mga_state.c
parent1d4f7d88003ae9abfddbec58aa91de281f533213 (diff)
downloadlinux-b420fb8dee00bda3ac3dc43df28fbc9eccf7f723.tar.xz
drm/mga: Remove references to struct drm_device.pdev
Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mga/mga_state.c')
-rw-r--r--drivers/gpu/drm/mga/mga_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mga/mga_state.c b/drivers/gpu/drm/mga/mga_state.c
index 0dec4062e5a2..5b7247b58451 100644
--- a/drivers/gpu/drm/mga/mga_state.c
+++ b/drivers/gpu/drm/mga/mga_state.c
@@ -1005,6 +1005,7 @@ int mga_getparam(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_mga_private_t *dev_priv = dev->dev_private;
drm_mga_getparam_t *param = data;
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
int value;
if (!dev_priv) {
@@ -1016,7 +1017,7 @@ int mga_getparam(struct drm_device *dev, void *data, struct drm_file *file_priv)
switch (param->param) {
case MGA_PARAM_IRQ_NR:
- value = dev->pdev->irq;
+ value = pdev->irq;
break;
case MGA_PARAM_CARD_TYPE:
value = dev_priv->chipset;