diff options
author | Eric Anholt <eric@anholt.net> | 2008-10-02 15:24:47 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-10-17 17:10:52 -0400 |
commit | 3043c60c485ad694392d3f71bd7ef9f5c5f7cfdd (patch) | |
tree | 8cda25875decd54bfb96f712b25b371450ab5f3d /drivers/gpu/drm/i915/i915_dma.c | |
parent | bd88ee4c1b1c8fc8b78a0ba7b6235d230cea0d05 (diff) |
drm: Clean up many sparse warnings in i915.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 048da791ca66..13a6116b59fe 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -76,7 +76,7 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller) | |||
76 | * Sets up the hardware status page for devices that need a physical address | 76 | * Sets up the hardware status page for devices that need a physical address |
77 | * in the register. | 77 | * in the register. |
78 | */ | 78 | */ |
79 | int i915_init_phys_hws(struct drm_device *dev) | 79 | static int i915_init_phys_hws(struct drm_device *dev) |
80 | { | 80 | { |
81 | drm_i915_private_t *dev_priv = dev->dev_private; | 81 | drm_i915_private_t *dev_priv = dev->dev_private; |
82 | /* Program Hardware Status Page */ | 82 | /* Program Hardware Status Page */ |
@@ -101,7 +101,7 @@ int i915_init_phys_hws(struct drm_device *dev) | |||
101 | * Frees the hardware status page, whether it's a physical address or a virtual | 101 | * Frees the hardware status page, whether it's a physical address or a virtual |
102 | * address set up by the X Server. | 102 | * address set up by the X Server. |
103 | */ | 103 | */ |
104 | void i915_free_hws(struct drm_device *dev) | 104 | static void i915_free_hws(struct drm_device *dev) |
105 | { | 105 | { |
106 | drm_i915_private_t *dev_priv = dev->dev_private; | 106 | drm_i915_private_t *dev_priv = dev->dev_private; |
107 | if (dev_priv->status_page_dmah) { | 107 | if (dev_priv->status_page_dmah) { |
@@ -145,8 +145,8 @@ static int i915_dma_cleanup(struct drm_device * dev) | |||
145 | 145 | ||
146 | if (dev_priv->ring.virtual_start) { | 146 | if (dev_priv->ring.virtual_start) { |
147 | drm_core_ioremapfree(&dev_priv->ring.map, dev); | 147 | drm_core_ioremapfree(&dev_priv->ring.map, dev); |
148 | dev_priv->ring.virtual_start = 0; | 148 | dev_priv->ring.virtual_start = NULL; |
149 | dev_priv->ring.map.handle = 0; | 149 | dev_priv->ring.map.handle = NULL; |
150 | dev_priv->ring.map.size = 0; | 150 | dev_priv->ring.map.size = 0; |
151 | } | 151 | } |
152 | 152 | ||
@@ -827,9 +827,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
827 | base = drm_get_resource_start(dev, mmio_bar); | 827 | base = drm_get_resource_start(dev, mmio_bar); |
828 | size = drm_get_resource_len(dev, mmio_bar); | 828 | size = drm_get_resource_len(dev, mmio_bar); |
829 | 829 | ||
830 | ret = drm_addmap(dev, base, size, _DRM_REGISTERS, | 830 | dev_priv->regs = ioremap(base, size); |
831 | _DRM_KERNEL | _DRM_DRIVER, | ||
832 | &dev_priv->mmio_map); | ||
833 | 831 | ||
834 | i915_gem_load(dev); | 832 | i915_gem_load(dev); |
835 | 833 | ||
@@ -867,8 +865,8 @@ int i915_driver_unload(struct drm_device *dev) | |||
867 | 865 | ||
868 | i915_free_hws(dev); | 866 | i915_free_hws(dev); |
869 | 867 | ||
870 | if (dev_priv->mmio_map) | 868 | if (dev_priv->regs != NULL) |
871 | drm_rmmap(dev, dev_priv->mmio_map); | 869 | iounmap(dev_priv->regs); |
872 | 870 | ||
873 | intel_opregion_free(dev); | 871 | intel_opregion_free(dev); |
874 | 872 | ||