dsi_runtime_put(dsidev);
if (dsi->module_id == 0)
- dsi->debugfs.regs = dss_debugfs_create_file("dsi1_regs",
+ dsi->debugfs.regs = dss_debugfs_create_file(dss, "dsi1_regs",
dsi1_dump_regs,
&dsi);
else
- dsi->debugfs.regs = dss_debugfs_create_file("dsi2_regs",
+ dsi->debugfs.regs = dss_debugfs_create_file(dss, "dsi2_regs",
dsi2_dump_regs,
&dsi);
#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS
if (dsi->module_id == 0)
- dsi->debugfs.irqs = dss_debugfs_create_file("dsi1_irqs",
+ dsi->debugfs.irqs = dss_debugfs_create_file(dss, "dsi1_irqs",
dsi1_dump_irqs,
&dsi);
else
- dsi->debugfs.irqs = dss_debugfs_create_file("dsi2_irqs",
+ dsi->debugfs.irqs = dss_debugfs_create_file(dss, "dsi2_irqs",
dsi2_dump_irqs,
&dsi);
#endif
return 0;
}
-static struct dentry *dss_debugfs_dir;
-
static int dss_initialize_debugfs(struct dss_device *dss)
{
- dss_debugfs_dir = debugfs_create_dir("omapdss", NULL);
- if (IS_ERR(dss_debugfs_dir)) {
- int err = PTR_ERR(dss_debugfs_dir);
+ struct dentry *dir;
- dss_debugfs_dir = NULL;
- return err;
- }
+ dir = debugfs_create_dir("omapdss", NULL);
+ if (IS_ERR(dir))
+ return PTR_ERR(dir);
+
+ dss->debugfs.root = dir;
return 0;
}
-static void dss_uninitialize_debugfs(void)
+static void dss_uninitialize_debugfs(struct dss_device *dss)
{
- if (dss_debugfs_dir)
- debugfs_remove_recursive(dss_debugfs_dir);
+ debugfs_remove_recursive(dss->debugfs.root);
}
struct dss_debugfs_entry {
.release = single_release,
};
-struct dss_debugfs_entry *dss_debugfs_create_file(const char *name,
- int (*show_fn)(struct seq_file *s, void *data), void *data)
+struct dss_debugfs_entry *
+dss_debugfs_create_file(struct dss_device *dss, const char *name,
+ int (*show_fn)(struct seq_file *s, void *data),
+ void *data)
{
struct dss_debugfs_entry *entry;
struct dentry *d;
entry->show_fn = show_fn;
entry->data = data;
- d = debugfs_create_file(name, 0444, dss_debugfs_dir, entry,
+ d = debugfs_create_file(name, 0444, dss->debugfs.root, entry,
&dss_debug_fops);
if (IS_ERR(d)) {
kfree(entry);
{
return 0;
}
-static inline void dss_uninitialize_debugfs(void)
+static inline void dss_uninitialize_debugfs(struct dss_device *dss)
{
}
#endif /* CONFIG_OMAP2_DSS_DEBUGFS */
if (r)
goto err_pm_runtime_disable;
- dss->debugfs.clk = dss_debugfs_create_file("clk", dss_debug_dump_clocks,
+ dss->debugfs.clk = dss_debugfs_create_file(dss, "clk",
+ dss_debug_dump_clocks, dss);
+ dss->debugfs.dss = dss_debugfs_create_file(dss, "dss", dss_dump_regs,
dss);
- dss->debugfs.dss = dss_debugfs_create_file("dss", dss_dump_regs, dss);
/* Add all the child devices as components. */
device_for_each_child(&pdev->dev, &match, dss_add_child_component);
err_uninit_debugfs:
dss_debugfs_remove_file(dss->debugfs.clk);
dss_debugfs_remove_file(dss->debugfs.dss);
- dss_uninitialize_debugfs();
+ dss_uninitialize_debugfs(dss);
err_pm_runtime_disable:
pm_runtime_disable(&pdev->dev);
dss_debugfs_remove_file(dss->debugfs.clk);
dss_debugfs_remove_file(dss->debugfs.dss);
- dss_uninitialize_debugfs();
+ dss_uninitialize_debugfs(dss);
pm_runtime_disable(&pdev->dev);
const struct dss_features *feat;
struct {
+ struct dentry *root;
struct dss_debugfs_entry *clk;
struct dss_debugfs_entry *dss;
} debugfs;
/* DSS */
#if defined(CONFIG_OMAP2_DSS_DEBUGFS)
-struct dss_debugfs_entry *dss_debugfs_create_file(const char *name,
- int (*show_fn)(struct seq_file *s, void *data), void *data);
+struct dss_debugfs_entry *
+dss_debugfs_create_file(struct dss_device *dss, const char *name,
+ int (*show_fn)(struct seq_file *s, void *data),
+ void *data);
void dss_debugfs_remove_file(struct dss_debugfs_entry *entry);
#else
static inline struct dss_debugfs_entry *
-dss_debugfs_create_file(const char *name,
+dss_debugfs_create_file(struct dss_device *dss, const char *name,
int (*show_fn)(struct seq_file *s, void *data),
void *data)
{