Skip to content

Commit 83df2d4

Browse files
committed
drm/omap: fix compile error when debugfs is disabled
When compiling with CONFIG_OMAP2_DSS_DEBUGFS disabled, build fails due to: drivers/gpu/drm/omapdrm/dss/dss.c:1474:10: error: ‘dss_debug_dump_clocks’ undeclared (first use in this function); did you mean ‘dispc_dump_clocks’? dss_debug_dump_clocks, dss); ^~~~~~~~~~~~~~~~~~~~~ dispc_dump_clocks Fix this by moving the required functions outside #if defined(CONFIG_OMAP2_DSS_DEBUGFS). In the long term, we perhaps want to try to get all the debugfs support left out if debugfs is not enabled. Signed-off-by: Tomi Valkeinen <[email protected]>
1 parent c39bbb9 commit 83df2d4

File tree

1 file changed

+12
-14
lines changed
  • drivers/gpu/drm/omapdrm/dss

1 file changed

+12
-14
lines changed

drivers/gpu/drm/omapdrm/dss/dss.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ const char *dss_get_clk_source_name(enum dss_clk_source clk_src)
343343
return dss_generic_clk_source_names[clk_src];
344344
}
345345

346-
#if defined(CONFIG_OMAP2_DSS_DEBUGFS)
347346
static void dss_dump_clocks(struct dss_device *dss, struct seq_file *s)
348347
{
349348
const char *fclk_name;
@@ -363,7 +362,6 @@ static void dss_dump_clocks(struct dss_device *dss, struct seq_file *s)
363362

364363
dss_runtime_put(dss);
365364
}
366-
#endif
367365

368366
static int dss_dump_regs(struct seq_file *s, void *p)
369367
{
@@ -390,6 +388,18 @@ static int dss_dump_regs(struct seq_file *s, void *p)
390388
return 0;
391389
}
392390

391+
static int dss_debug_dump_clocks(struct seq_file *s, void *p)
392+
{
393+
struct dss_device *dss = s->private;
394+
395+
dss_dump_clocks(dss, s);
396+
dispc_dump_clocks(dss->dispc, s);
397+
#ifdef CONFIG_OMAP2_DSS_DSI
398+
dsi_dump_clocks(s);
399+
#endif
400+
return 0;
401+
}
402+
393403
static int dss_get_channel_index(enum omap_channel channel)
394404
{
395405
switch (channel) {
@@ -889,18 +899,6 @@ struct dss_device *dss_get_device(struct device *dev)
889899

890900
/* DEBUGFS */
891901
#if defined(CONFIG_OMAP2_DSS_DEBUGFS)
892-
static int dss_debug_dump_clocks(struct seq_file *s, void *p)
893-
{
894-
struct dss_device *dss = s->private;
895-
896-
dss_dump_clocks(dss, s);
897-
dispc_dump_clocks(dss->dispc, s);
898-
#ifdef CONFIG_OMAP2_DSS_DSI
899-
dsi_dump_clocks(s);
900-
#endif
901-
return 0;
902-
}
903-
904902
static int dss_initialize_debugfs(struct dss_device *dss)
905903
{
906904
struct dentry *dir;

0 commit comments

Comments
 (0)