swiotlb: simplify debugfs setup
authorRobin Murphy <robin.murphy@arm.com>
Mon, 24 Jan 2022 16:40:17 +0000 (16:40 +0000)
committerChristoph Hellwig <hch@lst.de>
Wed, 26 Jan 2022 16:21:12 +0000 (17:21 +0100)
commit35265899acef135225e946b883fb07acba1d31a2
tree660ec6a4e5da8d56f77879df1ba94a2f5e8ed18d
parentdfcf2e017f5bb928094952d5d56d3566d3d07ba7
swiotlb: simplify debugfs setup

Debugfs functions are already stubbed out for !CONFIG_DEBUG_FS, so we
can remove most of the #ifdefs, just keeping one to manually optimise
away the initcall when it would do nothing. We can also simplify the
code itself by factoring out the directory creation and realising that
the global io_tlb_default_mem now makes debugfs_dir redundant.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/swiotlb.c