Commit bcc36d8a authored by Chris Wilson's avatar Chris Wilson

drm/i915: Use drm_i915_private directly from debugfs

The void *data passed to debugfs callbacks is actually the
drm_i915_private pointer, so use it thusly and avoid the to_i915(dev)
indirection.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170407194220.821-1-chris@chris-wilson.co.ukReviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent bea4e4a4
...@@ -2568,8 +2568,7 @@ static int i915_guc_log_dump(struct seq_file *m, void *data) ...@@ -2568,8 +2568,7 @@ static int i915_guc_log_dump(struct seq_file *m, void *data)
static int i915_guc_log_control_get(void *data, u64 *val) static int i915_guc_log_control_get(void *data, u64 *val)
{ {
struct drm_device *dev = data; struct drm_i915_private *dev_priv = data;
struct drm_i915_private *dev_priv = to_i915(dev);
if (!dev_priv->guc.log.vma) if (!dev_priv->guc.log.vma)
return -EINVAL; return -EINVAL;
...@@ -2581,14 +2580,13 @@ static int i915_guc_log_control_get(void *data, u64 *val) ...@@ -2581,14 +2580,13 @@ static int i915_guc_log_control_get(void *data, u64 *val)
static int i915_guc_log_control_set(void *data, u64 val) static int i915_guc_log_control_set(void *data, u64 val)
{ {
struct drm_device *dev = data; struct drm_i915_private *dev_priv = data;
struct drm_i915_private *dev_priv = to_i915(dev);
int ret; int ret;
if (!dev_priv->guc.log.vma) if (!dev_priv->guc.log.vma)
return -EINVAL; return -EINVAL;
ret = mutex_lock_interruptible(&dev->struct_mutex); ret = mutex_lock_interruptible(&dev_priv->drm.struct_mutex);
if (ret) if (ret)
return ret; return ret;
...@@ -2596,7 +2594,7 @@ static int i915_guc_log_control_set(void *data, u64 val) ...@@ -2596,7 +2594,7 @@ static int i915_guc_log_control_set(void *data, u64 val)
ret = i915_guc_log_control(dev_priv, val); ret = i915_guc_log_control(dev_priv, val);
intel_runtime_pm_put(dev_priv); intel_runtime_pm_put(dev_priv);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev_priv->drm.struct_mutex);
return ret; return ret;
} }
......
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