Skip to content

Commit

Permalink
drm/i915: Switch to using pci_iounmap in conjunction with pci_iomap
Browse files Browse the repository at this point in the history
After switching the MMIO registers to use pci_iomap, remember to dispose
of the mapping with pci_iounmap (for symmetry).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Oct 29, 2010
1 parent 4066c0a commit 6dda569
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
out_iomapfree:
io_mapping_free(dev_priv->mm.gtt_mapping);
out_rmmap:
iounmap(dev_priv->regs);
pci_iounmap(dev->pdev, dev_priv->regs);
put_bridge:
pci_dev_put(dev_priv->bridge_dev);
free_priv:
Expand Down Expand Up @@ -2168,7 +2168,7 @@ int i915_driver_unload(struct drm_device *dev)
}

if (dev_priv->regs != NULL)
iounmap(dev_priv->regs);
pci_iounmap(dev->pdev, dev_priv->regs);

intel_teardown_gmbus(dev);
intel_teardown_mchbar(dev);
Expand Down

0 comments on commit 6dda569

Please sign in to comment.