[Bluetooth] Remove unused functions and cleanup symbol exports

This patch removes the unused bt_dump() function and it also removes
its BT_DMP macro. It also unexports the hci_dev_get(), hci_send_cmd()
and hci_si_event() functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

-47
-2
drivers/bluetooth/hci_bcsp.c
··· 58 #ifndef CONFIG_BT_HCIUART_DEBUG 59 #undef BT_DBG 60 #define BT_DBG( A... ) 61 - #undef BT_DMP 62 - #define BT_DMP( A... ) 63 #endif 64 65 static int hciextn = 1;
··· 58 #ifndef CONFIG_BT_HCIUART_DEBUG 59 #undef BT_DBG 60 #define BT_DBG( A... ) 61 #endif 62 63 static int hciextn = 1;
-5
drivers/bluetooth/hci_h4.c
··· 57 #ifndef CONFIG_BT_HCIUART_DEBUG 58 #undef BT_DBG 59 #define BT_DBG( A... ) 60 - #undef BT_DMP 61 - #define BT_DMP( A... ) 62 #endif 63 64 /* Initialize protocol */ ··· 123 124 BT_DBG("len %d room %d", len, room); 125 if (!len) { 126 - BT_DMP(h4->rx_skb->data, h4->rx_skb->len); 127 hci_recv_frame(h4->rx_skb); 128 } else if (len > room) { 129 BT_ERR("Data length is too large"); ··· 165 switch (h4->rx_state) { 166 case H4_W4_DATA: 167 BT_DBG("Complete data"); 168 - 169 - BT_DMP(h4->rx_skb->data, h4->rx_skb->len); 170 171 hci_recv_frame(h4->rx_skb); 172
··· 57 #ifndef CONFIG_BT_HCIUART_DEBUG 58 #undef BT_DBG 59 #define BT_DBG( A... ) 60 #endif 61 62 /* Initialize protocol */ ··· 125 126 BT_DBG("len %d room %d", len, room); 127 if (!len) { 128 hci_recv_frame(h4->rx_skb); 129 } else if (len > room) { 130 BT_ERR("Data length is too large"); ··· 168 switch (h4->rx_state) { 169 case H4_W4_DATA: 170 BT_DBG("Complete data"); 171 172 hci_recv_frame(h4->rx_skb); 173
-2
drivers/bluetooth/hci_ldisc.c
··· 57 #ifndef CONFIG_BT_HCIUART_DEBUG 58 #undef BT_DBG 59 #define BT_DBG( A... ) 60 - #undef BT_DMP 61 - #define BT_DMP( A... ) 62 #endif 63 64 static int reset = 0;
··· 57 #ifndef CONFIG_BT_HCIUART_DEBUG 58 #undef BT_DBG 59 #define BT_DBG( A... ) 60 #endif 61 62 static int reset = 0;
-2
drivers/bluetooth/hci_usb.c
··· 57 #ifndef CONFIG_BT_HCIUSB_DEBUG 58 #undef BT_DBG 59 #define BT_DBG(D...) 60 - #undef BT_DMP 61 - #define BT_DMP(D...) 62 #endif 63 64 #ifndef CONFIG_BT_HCIUSB_ZERO_PACKET
··· 57 #ifndef CONFIG_BT_HCIUSB_DEBUG 58 #undef BT_DBG 59 #define BT_DBG(D...) 60 #endif 61 62 #ifndef CONFIG_BT_HCIUSB_ZERO_PACKET
-8
include/net/bluetooth/bluetooth.h
··· 57 #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) 58 #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) 59 60 - #ifdef HCI_DATA_DUMP 61 - #define BT_DMP(buf, len) bt_dump(__FUNCTION__, buf, len) 62 - #else 63 - #define BT_DMP(D...) 64 - #endif 65 - 66 extern struct proc_dir_entry *proc_bt; 67 68 /* Connection and socket states */ ··· 167 for (; frag; frag=frag->next, n++); 168 return n; 169 } 170 - 171 - void bt_dump(char *pref, __u8 *buf, int count); 172 173 int bt_err(__u16 code); 174
··· 57 #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) 58 #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) 59 60 extern struct proc_dir_entry *proc_bt; 61 62 /* Connection and socket states */ ··· 173 for (; frag; frag=frag->next, n++); 174 return n; 175 } 176 177 int bt_err(__u16 code); 178
-2
net/bluetooth/hci_core.c
··· 299 read_unlock(&hci_dev_list_lock); 300 return hdev; 301 } 302 - EXPORT_SYMBOL(hci_dev_get); 303 304 /* ---- Inquiry support ---- */ 305 static void inquiry_cache_flush(struct hci_dev *hdev) ··· 1041 1042 return 0; 1043 } 1044 - EXPORT_SYMBOL(hci_send_cmd); 1045 1046 /* Get data from the previously sent command */ 1047 void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf)
··· 299 read_unlock(&hci_dev_list_lock); 300 return hdev; 301 } 302 303 /* ---- Inquiry support ---- */ 304 static void inquiry_cache_flush(struct hci_dev *hdev) ··· 1042 1043 return 0; 1044 } 1045 1046 /* Get data from the previously sent command */ 1047 void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf)
-1
net/bluetooth/hci_event.c
··· 1040 hci_send_to_sock(hdev, skb); 1041 kfree_skb(skb); 1042 } 1043 - EXPORT_SYMBOL(hci_si_event);
··· 1040 hci_send_to_sock(hdev, skb); 1041 kfree_skb(skb); 1042 }
-25
net/bluetooth/lib.c
··· 34 35 #include <net/bluetooth/bluetooth.h> 36 37 - void bt_dump(char *pref, __u8 *buf, int count) 38 - { 39 - char *ptr; 40 - char line[100]; 41 - unsigned int i; 42 - 43 - printk(KERN_INFO "%s: dump, len %d\n", pref, count); 44 - 45 - ptr = line; 46 - *ptr = 0; 47 - for (i = 0; i < count; i++) { 48 - ptr += sprintf(ptr, " %2.2X", buf[i]); 49 - 50 - if (i && !((i + 1) % 20)) { 51 - printk(KERN_INFO "%s:%s\n", pref, line); 52 - ptr = line; 53 - *ptr = 0; 54 - } 55 - } 56 - 57 - if (line[0]) 58 - printk(KERN_INFO "%s:%s\n", pref, line); 59 - } 60 - EXPORT_SYMBOL(bt_dump); 61 - 62 void baswap(bdaddr_t *dst, bdaddr_t *src) 63 { 64 unsigned char *d = (unsigned char *) dst;
··· 34 35 #include <net/bluetooth/bluetooth.h> 36 37 void baswap(bdaddr_t *dst, bdaddr_t *src) 38 { 39 unsigned char *d = (unsigned char *) dst;