mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/i915/display: use drm->debugfs_root for creating debugfs files
Since commit 0b30d57aca ("drm/debugfs: rework debugfs directory
creation v5") we should be using drm->debugfs_root instead of
minor->debugfs_root for creating debugfs files.
As a rule of thumb, use a local variable when there are two or more
uses, otherwise just have the single reference inline.
Drop drm/drm_file.h include where possible.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/e8268546ec2a2941a3dc43c2fdc60f678dc03fce.1753782998.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_file.h>
|
||||
|
||||
#include "intel_display_core.h"
|
||||
#include "intel_display_debugfs_params.h"
|
||||
@@ -154,14 +153,14 @@ intel_display_debugfs_create_uint(const char *name, umode_t mode,
|
||||
/* add a subdirectory with files for each intel display param */
|
||||
void intel_display_debugfs_params(struct intel_display *display)
|
||||
{
|
||||
struct drm_minor *minor = display->drm->primary;
|
||||
struct dentry *debugfs_root = display->drm->debugfs_root;
|
||||
struct dentry *dir;
|
||||
char dirname[16];
|
||||
|
||||
snprintf(dirname, sizeof(dirname), "%s_params", display->drm->driver->name);
|
||||
dir = debugfs_lookup(dirname, minor->debugfs_root);
|
||||
dir = debugfs_lookup(dirname, debugfs_root);
|
||||
if (!dir)
|
||||
dir = debugfs_create_dir(dirname, minor->debugfs_root);
|
||||
dir = debugfs_create_dir(dirname, debugfs_root);
|
||||
if (IS_ERR(dir))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user