Commit e90c8de6 authored by Mathis MARION's avatar Mathis MARION Committed by Federico Vaga

Kernel 5.6 compatibility for debugfs_create_regset

The signature for `debugfs_create_regset32` changed from
returning a `struct dentry *` to `void`.
Error checking is no longer possible.
Signed-off-by: 's avatarGwenhael GOAVEC <gwenhael.goavec@femto-st.fr>
Signed-off-by: 's avatarMathis MARION <mathis.marion@grenoble-inp.org>
parent d47bbfdc
......@@ -301,6 +301,9 @@ int fa_debug_init(struct fa_dev *fa)
fa->dbg_reg32.regs = fa_debugfs_reg32;
fa->dbg_reg32.nregs = ARRAY_SIZE(fa_debugfs_reg32);
fa->dbg_reg32.base = fa->fa_top_level;
#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
debugfs_create_regset32("regs", 0444, fa->dbg_dir, &fa->dbg_reg32);
#else
fa->dbg_reg = debugfs_create_regset32("regs", 0444, fa->dbg_dir,
&fa->dbg_reg32);
if (IS_ERR_OR_NULL(fa->dbg_reg)) {
......@@ -309,6 +312,7 @@ int fa_debug_init(struct fa_dev *fa)
"Cannot create debugfs file \"regs\" (%d)\n",
err);
}
#endif
fa->dbg_reg_spi = debugfs_create_file("spi-regs", 0444,
fa->dbg_dir, fa,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment