Commit 0d38f009 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: [sparse] __iomem fixes for debugfs

These were mostly straight forward. No forced casting needed.
Signed-off-by: default avatarBen 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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 75020bc1
...@@ -1290,17 +1290,25 @@ static int i915_opregion(struct seq_file *m, void *unused) ...@@ -1290,17 +1290,25 @@ static int i915_opregion(struct seq_file *m, void *unused)
struct drm_device *dev = node->minor->dev; struct drm_device *dev = node->minor->dev;
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
struct intel_opregion *opregion = &dev_priv->opregion; struct intel_opregion *opregion = &dev_priv->opregion;
void *data = kmalloc(OPREGION_SIZE, GFP_KERNEL);
int ret; int ret;
if (data == NULL)
return -ENOMEM;
ret = mutex_lock_interruptible(&dev->struct_mutex); ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret) if (ret)
return ret; goto out;
if (opregion->header) if (opregion->header) {
seq_write(m, opregion->header, OPREGION_SIZE); memcpy_fromio(data, opregion->header, OPREGION_SIZE);
seq_write(m, data, OPREGION_SIZE);
}
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
out:
kfree(data);
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