summaryrefslogtreecommitdiff
path: root/drivers/edac/fsl_ddr_edac.c
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2018-11-20 01:53:40 +0300
committerBorislav Petkov <bp@suse.de>2018-11-20 19:33:32 +0300
commita59817fa8f4d299c46c94842bd2acb2aeff67d88 (patch)
tree8fe4b2e701717d4d6cdc099d691be0df7e938a44 /drivers/edac/fsl_ddr_edac.c
parentfa1c071c1efb28baef2409e28c186d40c76d7839 (diff)
downloadlinux-a59817fa8f4d299c46c94842bd2acb2aeff67d88.tar.xz
EDAC, fsl: Move error injection under CONFIG_EDAC_DEBUG
Gate error injection feature with CONFIG_EDAC_DEBUG so that it is not visible in production setups. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: York Sun <york.sun@nxp.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: linux-edac <linux-edac@vger.kernel.org> Link: https://lkml.kernel.org/r/20181119225303.13265-1-york.sun@nxp.com
Diffstat (limited to 'drivers/edac/fsl_ddr_edac.c')
-rw-r--r--drivers/edac/fsl_ddr_edac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c
index efc8276d1d9c..27826d38b4b7 100644
--- a/drivers/edac/fsl_ddr_edac.c
+++ b/drivers/edac/fsl_ddr_edac.c
@@ -51,6 +51,7 @@ static inline void ddr_out32(void __iomem *addr, u32 value)
iowrite32be(value, addr);
}
+#ifdef CONFIG_EDAC_DEBUG
/************************ MC SYSFS parts ***********************************/
#define to_mci(k) container_of(k, struct mem_ctl_info, dev)
@@ -151,11 +152,14 @@ static DEVICE_ATTR(inject_data_lo, S_IRUGO | S_IWUSR,
fsl_mc_inject_data_lo_show, fsl_mc_inject_data_lo_store);
static DEVICE_ATTR(inject_ctrl, S_IRUGO | S_IWUSR,
fsl_mc_inject_ctrl_show, fsl_mc_inject_ctrl_store);
+#endif /* CONFIG_EDAC_DEBUG */
static struct attribute *fsl_ddr_dev_attrs[] = {
+#ifdef CONFIG_EDAC_DEBUG
&dev_attr_inject_data_hi.attr,
&dev_attr_inject_data_lo.attr,
&dev_attr_inject_ctrl.attr,
+#endif
NULL
};