diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-12-14 12:50:53 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-12-16 11:29:42 +0200 |
commit | 2455a8e43d6b052047cf3fce9f417ff7fd619fc9 (patch) | |
tree | 85510692d35400f4265c1cd33020dd0f1e9ca3ce /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | 827303855da8722569999a56ab2ac0c96c567a4d (diff) | |
download | lwn-2455a8e43d6b052047cf3fce9f417ff7fd619fc9.tar.gz lwn-2455a8e43d6b052047cf3fce9f417ff7fd619fc9.zip |
drm/i915: don't use a temp buffer for opregion debugfs file
Hasn't been necessary since
commit 115719fceaa733d646e39cdce83cc32ddb891a49
Author: Williams, Dan J <dan.j.williams@intel.com>
Date: Mon Oct 12 21:12:57 2015 +0000
i915: switch from acpi_os_ioremap to memremap
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/74664a556a56d0eceb0029bbd77ffc1d771b0628.1450089383.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 24318b79bcfc..a9e1f18c36d1 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1842,25 +1842,18 @@ static int i915_opregion(struct seq_file *m, void *unused) struct drm_device *dev = node->minor->dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_opregion *opregion = &dev_priv->opregion; - void *data = kmalloc(OPREGION_SIZE, GFP_KERNEL); int ret; - if (data == NULL) - return -ENOMEM; - ret = mutex_lock_interruptible(&dev->struct_mutex); if (ret) goto out; - if (opregion->header) { - memcpy(data, opregion->header, OPREGION_SIZE); - seq_write(m, data, OPREGION_SIZE); - } + if (opregion->header) + seq_write(m, opregion->header, OPREGION_SIZE); mutex_unlock(&dev->struct_mutex); out: - kfree(data); return 0; } |