rtl8366_smi: add Kconfig option for the debugfs stuff
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 20 Jan 2010 09:30:36 +0000 (09:30 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 20 Jan 2010 09:30:36 +0000 (09:30 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19243 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/ar71xx/config-2.6.30
target/linux/ar71xx/config-2.6.31
target/linux/ar71xx/config-2.6.32
target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
target/linux/ar71xx/patches-2.6.30/204-rtl8366-smi-driver.patch
target/linux/ar71xx/patches-2.6.31/204-rtl8366-smi-driver.patch
target/linux/ar71xx/patches-2.6.32/204-rtl8366-smi-driver.patch

index 6984319820463ae0c6c93334d853662b7d34250d..22aff9bda2677b0932b9dddc0d002cb3d4a8ca7b 100644 (file)
@@ -185,6 +185,7 @@ CONFIG_PHYLIB=y
 # CONFIG_PROBE_INITRD_HEADER is not set
 CONFIG_RTL8306_PHY=y
 CONFIG_RTL8366_SMI=y
+# CONFIG_RTL8366_SMI_DEBUG_FS is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_SCSI_DMA is not set
 # CONFIG_SERIAL_8250_EXTENDED is not set
index 11543ab4e9b0a7b5ca2ee36e7d9d40483d2bcbbb..ef62b7d17c8588192ddf9466061a38563946b3a4 100644 (file)
@@ -190,6 +190,7 @@ CONFIG_PHYLIB=y
 # CONFIG_PROBE_INITRD_HEADER is not set
 CONFIG_RTL8306_PHY=y
 CONFIG_RTL8366_SMI=y
+# CONFIG_RTL8366_SMI_DEBUG_FS is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_SCSI_DMA is not set
 # CONFIG_SERIAL_8250_EXTENDED is not set
index 8c958af49178a3029396e9649dab4d0529c9dd25..8077926b6d46421e759ef1cf82b09c933e0c6d75 100644 (file)
@@ -193,6 +193,7 @@ CONFIG_PHYLIB=y
 # CONFIG_PROBE_INITRD_HEADER is not set
 CONFIG_RTL8306_PHY=y
 CONFIG_RTL8366_SMI=y
+# CONFIG_RTL8366_SMI_DEBUG_FS is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_SCSI_DMA is not set
 # CONFIG_SERIAL_8250_EXTENDED is not set
index 1043b3d44e135e27f941d9f3b8bf3292521cc8d6..a6ca06e67c4a9b22963e2b23205d8bc01bae6556 100644 (file)
@@ -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,
index 77874b49f6d6397e20f43db50782434e2d3f4d24..23dc525ece44ff1b13b5540d932d0d63eb56f75f 100644 (file)
@@ -1,12 +1,18 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -140,4 +140,8 @@ config MDIO_GPIO
+@@ -140,4 +140,14 @@ config MDIO_GPIO
          To compile this driver as a module, choose M here: the module
          will be called mdio-gpio.
  
 +config RTL8366_SMI
 +      tristate "Support for RTL8366 switch via SMI interface"
 +      depends on GENERIC_GPIO
++
++config RTL8366_SMI_DEBUG_FS
++      bool "RTL8366S driver DEBUG_FS support"
++      depends on RTL8366_SMI
++      depends on DEBUG_FS
++      default n
 +
  endif # PHYLIB
 --- a/drivers/net/phy/Makefile
index 77874b49f6d6397e20f43db50782434e2d3f4d24..23dc525ece44ff1b13b5540d932d0d63eb56f75f 100644 (file)
@@ -1,12 +1,18 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -140,4 +140,8 @@ config MDIO_GPIO
+@@ -140,4 +140,14 @@ config MDIO_GPIO
          To compile this driver as a module, choose M here: the module
          will be called mdio-gpio.
  
 +config RTL8366_SMI
 +      tristate "Support for RTL8366 switch via SMI interface"
 +      depends on GENERIC_GPIO
++
++config RTL8366_SMI_DEBUG_FS
++      bool "RTL8366S driver DEBUG_FS support"
++      depends on RTL8366_SMI
++      depends on DEBUG_FS
++      default n
 +
  endif # PHYLIB
 --- a/drivers/net/phy/Makefile
index 78ec2e44c06fdf63b8da4bd4a8872cb51d355bba..383513cda74bacb85d7016791139eefae8029bd5 100644 (file)
@@ -1,12 +1,18 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -146,4 +146,8 @@ config MDIO_GPIO
+@@ -146,4 +146,14 @@ config MDIO_GPIO
          To compile this driver as a module, choose M here: the module
          will be called mdio-gpio.
  
 +config RTL8366_SMI
 +      tristate "Support for RTL8366 switch via SMI interface"
 +      depends on GENERIC_GPIO
++
++config RTL8366_SMI_DEBUG_FS
++      bool "RTL8366S driver DEBUG_FS support"
++      depends on RTL8366_SMI
++      depends on DEBUG_FS
++      default n
 +
  endif # PHYLIB
 --- a/drivers/net/phy/Makefile