Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=46868202b2dd22156460a220553a223f406f4f22 Commit: 46868202b2dd22156460a220553a223f406f4f22 Parent: 2be9219680e8abfa79da74e8d827ecf5c41be76d Author: Holger Schurig <[EMAIL PROTECTED]> AuthorDate: Fri May 25 00:37:28 2007 -0400 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Mon Jun 11 14:28:37 2007 -0400
[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 <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- 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 d77bec9..1d880e7 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 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html