diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-21 16:49:10 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 05:18:00 -0400 |
commit | 0d38f00904bd74d791d60105dd4323c60f1767cb (patch) | |
tree | 3672493880efc32f446e351cde58847405fe8e81 /drivers | |
parent | 75020bc11c2fa4c060d45b8d0e3f6a37109725bc (diff) |
drm/i915: [sparse] __iomem fixes for debugfs
These were mostly straight forward. No forced casting needed.
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
[danvet: fix conflict with ringbuffer_data removal and drop the hunk
about the status page - that needs more care to fix up.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 8c899a2237ff..54a10667fe82 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -1290,17 +1290,25 @@ static int i915_opregion(struct seq_file *m, void *unused) | |||
1290 | struct drm_device *dev = node->minor->dev; | 1290 | struct drm_device *dev = node->minor->dev; |
1291 | drm_i915_private_t *dev_priv = dev->dev_private; | 1291 | drm_i915_private_t *dev_priv = dev->dev_private; |
1292 | struct intel_opregion *opregion = &dev_priv->opregion; | 1292 | struct intel_opregion *opregion = &dev_priv->opregion; |
1293 | void *data = kmalloc(OPREGION_SIZE, GFP_KERNEL); | ||
1293 | int ret; | 1294 | int ret; |
1294 | 1295 | ||
1296 | if (data == NULL) | ||
1297 | return -ENOMEM; | ||
1298 | |||
1295 | ret = mutex_lock_interruptible(&dev->struct_mutex); | 1299 | ret = mutex_lock_interruptible(&dev->struct_mutex); |
1296 | if (ret) | 1300 | if (ret) |
1297 | return ret; | 1301 | goto out; |
1298 | 1302 | ||
1299 | if (opregion->header) | 1303 | if (opregion->header) { |
1300 | seq_write(m, opregion->header, OPREGION_SIZE); | 1304 | memcpy_fromio(data, opregion->header, OPREGION_SIZE); |
1305 | seq_write(m, data, OPREGION_SIZE); | ||
1306 | } | ||
1301 | 1307 | ||
1302 | mutex_unlock(&dev->struct_mutex); | 1308 | mutex_unlock(&dev->struct_mutex); |
1303 | 1309 | ||
1310 | out: | ||
1311 | kfree(data); | ||
1304 | return 0; | 1312 | return 0; |
1305 | } | 1313 | } |
1306 | 1314 | ||