]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/i915/i915_debugfs.c
Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into...
[karo-tx-linux.git] / drivers / gpu / drm / i915 / i915_debugfs.c
index 2a1f0d7de0f25ef44762cf5401babed95d08ad46..967fb928c577552a376a26946e2b836542c73e17 100644 (file)
@@ -742,7 +742,7 @@ static void i915_ring_error_state(struct seq_file *m,
                                  struct drm_i915_error_state *error,
                                  unsigned ring)
 {
-       BUG_ON(ring > VCS); /* shut up confused gcc */
+       BUG_ON(ring >= I915_NUM_RINGS); /* shut up confused gcc */
        seq_printf(m, "%s command stream:\n", ring_str(ring));
        seq_printf(m, "  HEAD: 0x%08x\n", error->head[ring]);
        seq_printf(m, "  TAIL: 0x%08x\n", error->tail[ring]);
@@ -1588,14 +1588,6 @@ static int i915_dpio_info(struct seq_file *m, void *data)
        return 0;
 }
 
-static int
-i915_debugfs_common_open(struct inode *inode,
-                        struct file *filp)
-{
-       filp->private_data = inode->i_private;
-       return 0;
-}
-
 static ssize_t
 i915_wedged_read(struct file *filp,
                 char __user *ubuf,
@@ -1646,7 +1638,7 @@ i915_wedged_write(struct file *filp,
 
 static const struct file_operations i915_wedged_fops = {
        .owner = THIS_MODULE,
-       .open = i915_debugfs_common_open,
+       .open = simple_open,
        .read = i915_wedged_read,
        .write = i915_wedged_write,
        .llseek = default_llseek,
@@ -1708,7 +1700,7 @@ i915_max_freq_write(struct file *filp,
 
 static const struct file_operations i915_max_freq_fops = {
        .owner = THIS_MODULE,
-       .open = i915_debugfs_common_open,
+       .open = simple_open,
        .read = i915_max_freq_read,
        .write = i915_max_freq_write,
        .llseek = default_llseek,
@@ -1779,7 +1771,7 @@ i915_cache_sharing_write(struct file *filp,
 
 static const struct file_operations i915_cache_sharing_fops = {
        .owner = THIS_MODULE,
-       .open = i915_debugfs_common_open,
+       .open = simple_open,
        .read = i915_cache_sharing_read,
        .write = i915_cache_sharing_write,
        .llseek = default_llseek,