]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
Merge tag 'cxl-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ring.c
index 0554576d36955832c2483043f5aaeff08fea45e4..ab2351ba957480008ccbbda845cad87ee20a79ff 100644 (file)
@@ -415,26 +415,20 @@ static const struct file_operations amdgpu_debugfs_ring_fops = {
 
 #endif
 
-int amdgpu_debugfs_ring_init(struct amdgpu_device *adev,
-                            struct amdgpu_ring *ring)
+void amdgpu_debugfs_ring_init(struct amdgpu_device *adev,
+                             struct amdgpu_ring *ring)
 {
 #if defined(CONFIG_DEBUG_FS)
        struct drm_minor *minor = adev_to_drm(adev)->primary;
-       struct dentry *ent, *root = minor->debugfs_root;
+       struct dentry *root = minor->debugfs_root;
        char name[32];
 
        sprintf(name, "amdgpu_ring_%s", ring->name);
+       debugfs_create_file_size(name, S_IFREG | S_IRUGO, root, ring,
+                                &amdgpu_debugfs_ring_fops,
+                                ring->ring_size + 12);
 
-       ent = debugfs_create_file(name,
-                                 S_IFREG | S_IRUGO, root,
-                                 ring, &amdgpu_debugfs_ring_fops);
-       if (IS_ERR(ent))
-               return PTR_ERR(ent);
-
-       i_size_write(ent->d_inode, ring->ring_size + 12);
-       ring->ent = ent;
 #endif
-       return 0;
 }
 
 /**
This page took 0.027081 seconds and 4 git commands to generate.