Skip to content

Commit

Permalink
arm/komeda: Compile komeda_debugfs_init() only if CONFIG_DEBUG_FS is …
Browse files Browse the repository at this point in the history
…enabled

We don't call this function if CONFIG_DEBUG_FS is not defined, but we
should not be compiling it either, as the declaration of the debugfs
core functions is not included.

Reported by the kbuild test robot.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
  • Loading branch information
Liviu Dudau authored and Liviu Dudau committed Apr 1, 2019
1 parent 7d3cfb7 commit 5768326
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/arm/display/komeda/komeda_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static const struct file_operations komeda_register_fops = {
.release = single_release,
};

#ifdef CONFIG_DEBUG_FS
static void komeda_debugfs_init(struct komeda_dev *mdev)
{
if (!debugfs_initialized())
Expand All @@ -56,6 +57,7 @@ static void komeda_debugfs_init(struct komeda_dev *mdev)
debugfs_create_file("register", 0444, mdev->debugfs_root,
mdev, &komeda_register_fops);
}
#endif

static int komeda_parse_pipe_dt(struct komeda_dev *mdev, struct device_node *np)
{
Expand Down

0 comments on commit 5768326

Please sign in to comment.