diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-05-25 00:37:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:37 -0400 |
commit | 46868202b2dd22156460a220553a223f406f4f22 (patch) | |
tree | 20a1416dd5f42289c088c95f02ef0e4133cb208f /drivers/net/wireless | |
parent | 2be9219680e8abfa79da74e8d827ecf5c41be76d (diff) |
[PATCH] libertas: exclude non-used code when PROC_DEBUG is not set
This reduces usb8xxx.ko by 951 bytes (text) and 256 bytes (data)
when PROC_DEBUG isn't defined.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/libertas/debugfs.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index d77bec9f5d1..1d880e7973b 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c @@ -4,6 +4,7 @@ #include <linux/delay.h> #include <linux/mm.h> #include <net/iw_handler.h> + #include "dev.h" #include "decl.h" #include "host.h" @@ -15,7 +16,9 @@ static char *szStates[] = { "Disconnected" }; -void libertas_debug_init(wlan_private * priv, struct net_device *dev); +#ifdef PROC_DEBUG +static void libertas_debug_init(wlan_private * priv, struct net_device *dev); +#endif static int open_file_generic(struct inode *inode, struct file *file) { @@ -62,15 +65,7 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf, char *buf = (char *)addr; pos += snprintf(buf+pos, len-pos, - "---------------------------------------"); - pos += snprintf(buf+pos, len-pos, - "---------------------------------------\n"); - pos += snprintf(buf+pos, len-pos, "# | ch | ss | bssid | cap | TSF | Qual | SSID \n"); - pos += snprintf(buf+pos, len-pos, - "---------------------------------------"); - pos += snprintf(buf+pos, len-pos, - "---------------------------------------\n"); while (numscansdone < priv->adapter->numinscantable) { struct bss_descriptor *pbssinfo; @@ -1772,11 +1767,16 @@ void libertas_debugfs_remove_one(wlan_private *priv) debugfs_remove(priv->debugfs_dir); } + + /* debug entry */ +#ifdef PROC_DEBUG + #define item_size(n) (FIELD_SIZEOF(wlan_adapter, n)) #define item_addr(n) (offsetof(wlan_adapter, n)) + struct debug_data { char name[32]; u32 size; @@ -1914,7 +1914,7 @@ static struct file_operations libertas_debug_fops = { * @param dev pointer net_device * @return N/A */ -void libertas_debug_init(wlan_private * priv, struct net_device *dev) +static void libertas_debug_init(wlan_private * priv, struct net_device *dev) { int i; @@ -1928,4 +1928,5 @@ void libertas_debug_init(wlan_private * priv, struct net_device *dev) priv->debugfs_dir, &items[0], &libertas_debug_fops); } +#endif |