Fix build error when CONFIG_DEBUG_FS is disabled:
drivers/gpu/drm/qxl/qxl_debugfs.c: In function 'qxl_debugfs_init':
drivers/gpu/drm/qxl/qxl_debugfs.c:76:2: error: implicit declaration of function 'drm_debugfs_create_files'
drivers/gpu/drm/qxl/qxl_debugfs.c: In function 'qxl_debugfs_takedown':
drivers/gpu/drm/qxl/qxl_debugfs.c:84:2: error: implicit declaration of function 'drm_debugfs_remove_files'
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
+#if defined(CONFIG_DEBUG_FS)
static int
qxl_debugfs_irq_received(struct seq_file *m, void *data)
{
static int
qxl_debugfs_irq_received(struct seq_file *m, void *data)
{
{ "qxl_buffers", qxl_debugfs_buffers_info, 0, NULL },
};
#define QXL_DEBUGFS_ENTRIES ARRAY_SIZE(qxl_debugfs_list)
{ "qxl_buffers", qxl_debugfs_buffers_info, 0, NULL },
};
#define QXL_DEBUGFS_ENTRIES ARRAY_SIZE(qxl_debugfs_list)
int
qxl_debugfs_init(struct drm_minor *minor)
{
int
qxl_debugfs_init(struct drm_minor *minor)
{
+#if defined(CONFIG_DEBUG_FS)
drm_debugfs_create_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES,
minor->debugfs_root, minor);
drm_debugfs_create_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES,
minor->debugfs_root, minor);
return 0;
}
void
qxl_debugfs_takedown(struct drm_minor *minor)
{
return 0;
}
void
qxl_debugfs_takedown(struct drm_minor *minor)
{
+#if defined(CONFIG_DEBUG_FS)
drm_debugfs_remove_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES,
minor);
drm_debugfs_remove_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES,
minor);
}
int qxl_debugfs_add_files(struct qxl_device *qdev,
}
int qxl_debugfs_add_files(struct qxl_device *qdev,