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

iommu: Fix IOMMU debugfs fallout

A change made in the final version of IOMMU debugfs support replaced the
public function iommu_debugfs_new_driver_dir() by the public dentry
iommu_debugfs_dir in <linux/iommu.h>, but forgot to update both the
implementation in iommu-debugfs.c, and the patch description.

Fix this by exporting iommu_debugfs_dir, and removing the reference to
and implementation of iommu_debugfs_new_driver_dir().

Fixes: bad614b24293ae46 ("iommu: Enable debugfs exposure of IOMMU driver internals")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Geert Uytterhoeven and committed by
Joerg Roedel
18b3af44 a7055d57

+4 -19
+4 -19
drivers/iommu/iommu-debugfs.c
··· 12 12 #include <linux/debugfs.h> 13 13 14 14 struct dentry *iommu_debugfs_dir; 15 + EXPORT_SYMBOL_GPL(iommu_debugfs_dir); 15 16 16 17 /** 17 18 * iommu_debugfs_setup - create the top-level iommu directory in debugfs ··· 24 23 * Emit a strong warning at boot time to indicate that this feature is 25 24 * enabled. 26 25 * 27 - * This function is called from iommu_init; drivers may then call 28 - * iommu_debugfs_new_driver_dir() to instantiate a vendor-specific 29 - * directory to be used to expose internal data. 26 + * This function is called from iommu_init; drivers may then use 27 + * iommu_debugfs_dir to instantiate a vendor-specific directory to be used 28 + * to expose internal data. 30 29 */ 31 30 void iommu_debugfs_setup(void) 32 31 { ··· 49 48 pr_warn("*************************************************************\n"); 50 49 } 51 50 } 52 - 53 - /** 54 - * iommu_debugfs_new_driver_dir - create a vendor directory under debugfs/iommu 55 - * @vendor: name of the vendor-specific subdirectory to create 56 - * 57 - * This function is called by an IOMMU driver to create the top-level debugfs 58 - * directory for that driver. 59 - * 60 - * Return: upon success, a pointer to the dentry for the new directory. 61 - * NULL in case of failure. 62 - */ 63 - struct dentry *iommu_debugfs_new_driver_dir(const char *vendor) 64 - { 65 - return debugfs_create_dir(vendor, iommu_debugfs_dir); 66 - } 67 - EXPORT_SYMBOL_GPL(iommu_debugfs_new_driver_dir);