From patchwork Tue Aug 11 20:47:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 6994561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1DB059F358 for ; Tue, 11 Aug 2015 20:51:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1458F20686 for ; Tue, 11 Aug 2015 20:51:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46B602065A for ; Tue, 11 Aug 2015 20:51:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPGTR-0004ot-7e; Tue, 11 Aug 2015 20:48:41 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPGTL-0004EU-S4 for linux-arm-kernel@lists.infradead.org; Tue, 11 Aug 2015 20:48:36 +0000 Received: by pabyb7 with SMTP id yb7so137557582pab.0 for ; Tue, 11 Aug 2015 13:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tR1saI1oNSi4BWXPDmRdrdI13MtLcmLea1qjHrXKZv4=; b=AgMIR/1ODX8o7DV1t540vYKX907s67TDCp1iB2prOjVSHEcd0hMdSLeU/N0G8Ed/xF 5YdLhgHaXfMK8A2VQPhRLA6qCf66KdYHhCiubli9UXdmDDai5DOSCrZDjznJNW3Z1n21 j26Q8CChlOkw8z1QyaNWmQ0+xs/YzaPu2YMMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tR1saI1oNSi4BWXPDmRdrdI13MtLcmLea1qjHrXKZv4=; b=gyY+CtDq7d2y92XtjMqye8OINPot8gxfkoFVCtD3Oe25xjtlNYNQksgiCn2iIUzhAm 1oczgGFRrL+CkXkL45WHlWWM22ThDQPGRHdt+9rAUr2lD+M4oMyrW01SaGv6bf2Bvcfh ZCDKNP9ikzWW+cAlUwCG57HVnDWGgHP4tyyq9n5aF91ooeeQDl4O1fHk/0RAqSTu/6rt 8mXL6yjnx1kEKuTTtlXt4tk6iwaFkIxA2JtONTWjzEMrTI35t9NGZsfZASFEIax3le02 T5Pgpe3lIK9NeLbHdVIErO2KlqW+JUsI8cKkSe+NSIQpV2yxpnHah3necFiNdMATccUL DySA== X-Gm-Message-State: ALoCoQkNWu6lELrnTI757SIrxUL6JQbXx+ip44v35b6grMSN9qW6zO77PQbLsWFWq33R4j7v5D1F X-Received: by 10.68.200.225 with SMTP id jv1mr60856892pbc.63.1439326094278; Tue, 11 Aug 2015 13:48:14 -0700 (PDT) Received: from localhost ([198.137.200.11]) by smtp.gmail.com with ESMTPSA id k5sm3757551pdo.48.2015.08.11.13.48.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Aug 2015 13:48:12 -0700 (PDT) From: Loc Ho To: dougthompson@xmission.com, bp@alien8.de, mchehab@osg.samsung.com, arnd@arndb.de Subject: [PATCH v3 1/4] edac: Add an function to retrieve the EDAC debugfs node Date: Tue, 11 Aug 2015 14:47:54 -0600 Message-Id: <1439326077-25507-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.5.5 In-Reply-To: <1439326077-25507-1-git-send-email-lho@apm.com> References: <1439326077-25507-1-git-send-email-lho@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150811_134836_042677_9746491E X-CRM114-Status: GOOD ( 10.61 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, ijc+devicetree@hellion.org.uk, jcm@redhat.com, patches@apm.com, robh+dt@kernel.org, Loc Ho , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds an function to retrieve the EDAC debugfs node. This allows EDAC driver to create debugfs node under the EDAC debugfs node. Signed-off-by: Loc Ho --- drivers/edac/edac_core.h | 1 + drivers/edac/edac_mc_sysfs.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h index ad42587..6771e64 100644 --- a/drivers/edac/edac_core.h +++ b/drivers/edac/edac_core.h @@ -511,5 +511,6 @@ extern void edac_pci_remove_sysfs(struct edac_pci_ctl_info *pci); * edac misc APIs */ extern char *edac_op_state_to_string(int op_state); +extern struct dentry *edac_get_debugfs(void); #endif /* _EDAC_CORE_H_ */ diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 33df7d9..b76afe0 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -959,6 +959,16 @@ nomem: debugfs_remove(mci->debugfs); return -ENOMEM; } + +struct dentry *edac_get_debugfs(void) +{ + return edac_debugfs; +} +#else +struct dentry *edac_get_debugfs(void) +{ + return NULL; +} #endif /*