Commit 1d4f7d88 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/i810: 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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-2-tzimmermann@suse.de
parent 5109d297
...@@ -220,7 +220,7 @@ static int i810_dma_cleanup(struct drm_device *dev) ...@@ -220,7 +220,7 @@ static int i810_dma_cleanup(struct drm_device *dev)
if (dev_priv->ring.virtual_start) if (dev_priv->ring.virtual_start)
drm_legacy_ioremapfree(&dev_priv->ring.map, dev); drm_legacy_ioremapfree(&dev_priv->ring.map, dev);
if (dev_priv->hw_status_page) { if (dev_priv->hw_status_page) {
dma_free_coherent(&dev->pdev->dev, PAGE_SIZE, dma_free_coherent(dev->dev, PAGE_SIZE,
dev_priv->hw_status_page, dev_priv->hw_status_page,
dev_priv->dma_status_page); dev_priv->dma_status_page);
} }
...@@ -398,7 +398,7 @@ static int i810_dma_initialize(struct drm_device *dev, ...@@ -398,7 +398,7 @@ static int i810_dma_initialize(struct drm_device *dev,
/* Program Hardware Status Page */ /* Program Hardware Status Page */
dev_priv->hw_status_page = dev_priv->hw_status_page =
dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE, dma_alloc_coherent(dev->dev, PAGE_SIZE,
&dev_priv->dma_status_page, GFP_KERNEL); &dev_priv->dma_status_page, GFP_KERNEL);
if (!dev_priv->hw_status_page) { if (!dev_priv->hw_status_page) {
dev->dev_private = (void *)dev_priv; dev->dev_private = (void *)dev_priv;
...@@ -1197,6 +1197,8 @@ static int i810_flip_bufs(struct drm_device *dev, void *data, ...@@ -1197,6 +1197,8 @@ static int i810_flip_bufs(struct drm_device *dev, void *data,
int i810_driver_load(struct drm_device *dev, unsigned long flags) int i810_driver_load(struct drm_device *dev, unsigned long flags)
{ {
struct pci_dev *pdev = to_pci_dev(dev->dev);
dev->agp = drm_agp_init(dev); dev->agp = drm_agp_init(dev);
if (dev->agp) { if (dev->agp) {
dev->agp->agp_mtrr = arch_phys_wc_add( dev->agp->agp_mtrr = arch_phys_wc_add(
...@@ -1209,7 +1211,7 @@ int i810_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -1209,7 +1211,7 @@ int i810_driver_load(struct drm_device *dev, unsigned long flags)
if (!dev->agp) if (!dev->agp)
return -EINVAL; return -EINVAL;
pci_set_master(dev->pdev); pci_set_master(pdev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment