Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit0b24a0b

Browse files
andy-shevMarc Zyngier
authored and
Marc Zyngier
committed
irqdomain: Re-use DEFINE_SHOW_ATTRIBUTE() macro
...instead of open coding file operations followed by custom ->open()callbacks per each attribute.Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent2d02424 commit0b24a0b

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

‎kernel/irq/irqdomain.c‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,25 +1726,14 @@ static int irq_domain_debug_show(struct seq_file *m, void *p)
17261726
irq_domain_debug_show_one(m,d,0);
17271727
return0;
17281728
}
1729-
1730-
staticintirq_domain_debug_open(structinode*inode,structfile*file)
1731-
{
1732-
returnsingle_open(file,irq_domain_debug_show,inode->i_private);
1733-
}
1734-
1735-
staticconststructfile_operationsdfs_domain_ops= {
1736-
.open=irq_domain_debug_open,
1737-
.read=seq_read,
1738-
.llseek=seq_lseek,
1739-
.release=single_release,
1740-
};
1729+
DEFINE_SHOW_ATTRIBUTE(irq_domain_debug);
17411730

17421731
staticvoiddebugfs_add_domain_dir(structirq_domain*d)
17431732
{
17441733
if (!d->name|| !domain_dir||d->debugfs_file)
17451734
return;
17461735
d->debugfs_file=debugfs_create_file(d->name,0444,domain_dir,d,
1747-
&dfs_domain_ops);
1736+
&irq_domain_debug_fops);
17481737
}
17491738

17501739
staticvoiddebugfs_remove_domain_dir(structirq_domain*d)
@@ -1760,7 +1749,8 @@ void __init irq_domain_debugfs_init(struct dentry *root)
17601749
if (!domain_dir)
17611750
return;
17621751

1763-
debugfs_create_file("default",0444,domain_dir,NULL,&dfs_domain_ops);
1752+
debugfs_create_file("default",0444,domain_dir,NULL,
1753+
&irq_domain_debug_fops);
17641754
mutex_lock(&irq_domain_mutex);
17651755
list_for_each_entry(d,&irq_domain_list,link)
17661756
debugfs_add_domain_dir(d);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp