Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <tomi.valkeinen@ti.com>

+12 -14
+12 -14
drivers/gpu/drm/omapdrm/dss/dss.c
··· 343 343 return dss_generic_clk_source_names[clk_src]; 344 344 } 345 345 346 - #if defined(CONFIG_OMAP2_DSS_DEBUGFS) 347 346 static void dss_dump_clocks(struct dss_device *dss, struct seq_file *s) 348 347 { 349 348 const char *fclk_name; ··· 362 363 363 364 dss_runtime_put(dss); 364 365 } 365 - #endif 366 366 367 367 static int dss_dump_regs(struct seq_file *s, void *p) 368 368 { ··· 385 387 386 388 dss_runtime_put(dss); 387 389 #undef DUMPREG 390 + return 0; 391 + } 392 + 393 + static int dss_debug_dump_clocks(struct seq_file *s, void *p) 394 + { 395 + struct dss_device *dss = s->private; 396 + 397 + dss_dump_clocks(dss, s); 398 + dispc_dump_clocks(dss->dispc, s); 399 + #ifdef CONFIG_OMAP2_DSS_DSI 400 + dsi_dump_clocks(s); 401 + #endif 388 402 return 0; 389 403 } 390 404 ··· 899 889 900 890 /* DEBUGFS */ 901 891 #if defined(CONFIG_OMAP2_DSS_DEBUGFS) 902 - static int dss_debug_dump_clocks(struct seq_file *s, void *p) 903 - { 904 - struct dss_device *dss = s->private; 905 - 906 - dss_dump_clocks(dss, s); 907 - dispc_dump_clocks(dss->dispc, s); 908 - #ifdef CONFIG_OMAP2_DSS_DSI 909 - dsi_dump_clocks(s); 910 - #endif 911 - return 0; 912 - } 913 - 914 892 static int dss_initialize_debugfs(struct dss_device *dss) 915 893 { 916 894 struct dentry *dir;