Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889AbbEXPUS (ORCPT ); Sun, 24 May 2015 11:20:18 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:62137 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbbEXPUK (ORCPT ); Sun, 24 May 2015 11:20:10 -0400 From: Paul Burton To: CC: Paul Burton , Lars-Peter Clausen , Thomas Gleixner , Jason Cooper , Ralf Baechle , , Brian Norris Subject: [PATCH v5 14/37] MIPS: JZ4740: drop intc debugfs code Date: Sun, 24 May 2015 16:11:24 +0100 Message-ID: <1432480307-23789-15-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> References: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.159.140] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2375 Lines: 88 The debugfs code becomes a nuisance when attempting to avoid globals, since the interrupt controller probe function run too early for it to be safe to create the debugfs files. Drop it. Signed-off-by: Paul Burton Cc: Lars-Peter Clausen Cc: Thomas Gleixner Cc: Jason Cooper Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Acked-by: Lars-Peter Clausen --- Changes in v5: None Changes in v4: None Changes in v3: - New patch. Changes in v2: None arch/mips/jz4740/irq.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index ddcf78a..615eaa8 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c @@ -23,9 +23,6 @@ #include #include -#include -#include - #include #include @@ -123,42 +120,3 @@ static int __init jz4740_intc_of_init(struct device_node *node, return 0; } IRQCHIP_DECLARE(jz4740_intc, "ingenic,jz4740-intc", jz4740_intc_of_init); - -#ifdef CONFIG_DEBUG_FS - -static inline void intc_seq_reg(struct seq_file *s, const char *name, - unsigned int reg) -{ - seq_printf(s, "%s:\t\t%08x\n", name, readl(jz_intc_base + reg)); -} - -static int intc_regs_show(struct seq_file *s, void *unused) -{ - intc_seq_reg(s, "Status", JZ_REG_INTC_STATUS); - intc_seq_reg(s, "Mask", JZ_REG_INTC_MASK); - intc_seq_reg(s, "Pending", JZ_REG_INTC_PENDING); - - return 0; -} - -static int intc_regs_open(struct inode *inode, struct file *file) -{ - return single_open(file, intc_regs_show, NULL); -} - -static const struct file_operations intc_regs_operations = { - .open = intc_regs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static int __init intc_debugfs_init(void) -{ - (void) debugfs_create_file("jz_regs_intc", S_IFREG | S_IRUGO, - NULL, NULL, &intc_regs_operations); - return 0; -} -subsys_initcall(intc_debugfs_init); - -#endif -- 2.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/