summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-01-20 09:30:36 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-01-20 09:30:36 +0000
commit5e5451a54d2c3bcca2e876be4a2d34b8da59b9b8 (patch)
treea341b5fb8a8a2e8f7a0b2deb581ccdca07b4fe45 /target/linux/ar71xx/files
parent0d48b043b1540a6f12a5319133ac98f5c43a42fb (diff)
downloadmtk-20170518-5e5451a54d2c3bcca2e876be4a2d34b8da59b9b8.zip
mtk-20170518-5e5451a54d2c3bcca2e876be4a2d34b8da59b9b8.tar.gz
mtk-20170518-5e5451a54d2c3bcca2e876be4a2d34b8da59b9b8.tar.bz2
rtl8366_smi: add Kconfig option for the debugfs stuff
SVN-Revision: 19243
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c b/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
index 1043b3d..a6ca06e 100644
--- a/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
+++ b/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
@@ -21,9 +21,7 @@
#include <linux/phy.h>
#include <linux/rtl8366_smi.h>
-/* #define DEBUG 1 */
-
-#ifdef DEBUG
+#ifdef CONFIG_RTL8366_SMI_DEBUG_FS
#include <linux/debugfs.h>
#endif
@@ -210,12 +208,12 @@ struct rtl8366_smi {
struct switch_dev dev;
int mii_irq[PHY_MAX_ADDR];
char buf[4096];
-#ifdef DEBUG
+#ifdef CONFIG_RTL8366_SMI_DEBUG_FS
struct dentry *debugfs_root;
#endif
};
-#ifdef DEBUG
+#ifdef CONFIG_RTL8366_SMI_DEBUG_FS
u16 g_dbg_reg;
#endif
@@ -972,7 +970,7 @@ static int rtl8366s_reset_vlan(struct rtl8366_smi *smi)
return 0;
}
-#ifdef DEBUG
+#ifdef CONFIG_RTL8366_SMI_DEBUG_FS
static int rtl8366_debugfs_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
@@ -1197,7 +1195,7 @@ static void rtl8366_debugfs_remove(struct rtl8366_smi *smi)
#else
static inline void rtl8366_debugfs_init(struct rtl8366_smi *smi) {}
static inline void rtl8366_debugfs_remove(struct rtl8366_smi *smi) {}
-#endif
+#endif /* CONFIG_RTL8366_SMI_DEBUG_FS */
static int rtl8366_global_reset_mibs(struct switch_dev *dev,
const struct switch_attr *attr,