Skip to content

Commit 69dd450

Browse files
gregkhMarc Zyngier
authored andcommitted
irqdomain: Remove debugfs_file from struct irq_domain
There's no need to keep around a dentry pointer to a simple file that debugfs itself can look up when we need to remove it from the system. So simplify the code by deleting the variable and cleaning up the logic around the debugfs file. Cc: Marc Zyngier <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a38fd87 commit 69dd450

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

include/linux/irqdomain.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ struct irq_domain_chip_generic;
150150
* setting up one or more generic chips for interrupt controllers
151151
* drivers using the generic chip library which uses this pointer.
152152
* @parent: Pointer to parent irq_domain to support hierarchy irq_domains
153-
* @debugfs_file: dentry for the domain debugfs file
154153
*
155154
* Revmap data, used internally by irq_domain
156155
* @revmap_direct_max_irq: The largest hwirq that can be set for controllers that
@@ -174,9 +173,6 @@ struct irq_domain {
174173
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
175174
struct irq_domain *parent;
176175
#endif
177-
#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
178-
struct dentry *debugfs_file;
179-
#endif
180176

181177
/* reverse map data. The linear map gets appended to the irq_domain */
182178
irq_hw_number_t hwirq_max;

kernel/irq/irqdomain.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,16 +1898,15 @@ DEFINE_SHOW_ATTRIBUTE(irq_domain_debug);
18981898

18991899
static void debugfs_add_domain_dir(struct irq_domain *d)
19001900
{
1901-
if (!d->name || !domain_dir || d->debugfs_file)
1901+
if (!d->name || !domain_dir)
19021902
return;
1903-
d->debugfs_file = debugfs_create_file(d->name, 0444, domain_dir, d,
1904-
&irq_domain_debug_fops);
1903+
debugfs_create_file(d->name, 0444, domain_dir, d,
1904+
&irq_domain_debug_fops);
19051905
}
19061906

19071907
static void debugfs_remove_domain_dir(struct irq_domain *d)
19081908
{
1909-
debugfs_remove(d->debugfs_file);
1910-
d->debugfs_file = NULL;
1909+
debugfs_remove(debugfs_lookup(d->name, domain_dir));
19111910
}
19121911

19131912
void __init irq_domain_debugfs_init(struct dentry *root)

0 commit comments

Comments
 (0)