diff options
| -rw-r--r-- | kernel/irq/irqdomain.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index e6a9c36470ee..82b8b18ee1eb 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
| @@ -1726,25 +1726,14 @@ static int irq_domain_debug_show(struct seq_file *m, void *p) | |||
| 1726 | irq_domain_debug_show_one(m, d, 0); | 1726 | irq_domain_debug_show_one(m, d, 0); |
| 1727 | return 0; | 1727 | return 0; |
| 1728 | } | 1728 | } |
| 1729 | 1729 | DEFINE_SHOW_ATTRIBUTE(irq_domain_debug); | |
| 1730 | static int irq_domain_debug_open(struct inode *inode, struct file *file) | ||
| 1731 | { | ||
| 1732 | return single_open(file, irq_domain_debug_show, inode->i_private); | ||
| 1733 | } | ||
| 1734 | |||
| 1735 | static const struct file_operations dfs_domain_ops = { | ||
| 1736 | .open = irq_domain_debug_open, | ||
| 1737 | .read = seq_read, | ||
| 1738 | .llseek = seq_lseek, | ||
| 1739 | .release = single_release, | ||
| 1740 | }; | ||
| 1741 | 1730 | ||
| 1742 | static void debugfs_add_domain_dir(struct irq_domain *d) | 1731 | static void debugfs_add_domain_dir(struct irq_domain *d) |
| 1743 | { | 1732 | { |
| 1744 | if (!d->name || !domain_dir || d->debugfs_file) | 1733 | if (!d->name || !domain_dir || d->debugfs_file) |
| 1745 | return; | 1734 | return; |
| 1746 | d->debugfs_file = debugfs_create_file(d->name, 0444, domain_dir, d, | 1735 | d->debugfs_file = debugfs_create_file(d->name, 0444, domain_dir, d, |
| 1747 | &dfs_domain_ops); | 1736 | &irq_domain_debug_fops); |
| 1748 | } | 1737 | } |
| 1749 | 1738 | ||
| 1750 | static void debugfs_remove_domain_dir(struct irq_domain *d) | 1739 | static void debugfs_remove_domain_dir(struct irq_domain *d) |
| @@ -1760,7 +1749,8 @@ void __init irq_domain_debugfs_init(struct dentry *root) | |||
| 1760 | if (!domain_dir) | 1749 | if (!domain_dir) |
| 1761 | return; | 1750 | return; |
| 1762 | 1751 | ||
| 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); | ||
| 1764 | mutex_lock(&irq_domain_mutex); | 1754 | mutex_lock(&irq_domain_mutex); |
| 1765 | list_for_each_entry(d, &irq_domain_list, link) | 1755 | list_for_each_entry(d, &irq_domain_list, link) |
| 1766 | debugfs_add_domain_dir(d); | 1756 | debugfs_add_domain_dir(d); |
