]> git.neil.brown.name Git - history.git/commitdiff
[Bluetooth] Declare more functions static
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Mar 2004 20:07:31 +0000 (21:07 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Mar 2004 20:07:31 +0000 (21:07 +0100)
This patch declares all possible functions static.

drivers/bluetooth/bcm203x.c
drivers/bluetooth/bfusb.c
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_usb.c
net/bluetooth/af_bluetooth.c
net/bluetooth/bnep/core.c
net/bluetooth/cmtp/core.c
net/bluetooth/l2cap.c
net/bluetooth/rfcomm/core.c
net/bluetooth/sco.c

index 03c5df973d3c14f7de9bea225735d2fc316918a4..d5f09ec1dbdd93a0f34abc911fbd246b82f7762e 100644 (file)
@@ -296,13 +296,13 @@ static int __init bcm203x_init(void)
        return err;
 }
 
-static void __exit bcm203x_cleanup(void)
+static void __exit bcm203x_exit(void)
 {
        usb_deregister(&bcm203x_driver);
 }
 
 module_init(bcm203x_init);
-module_exit(bcm203x_cleanup);
+module_exit(bcm203x_exit);
 
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION);
index 4efae3a97fceeaaed308763a57ecdfaf4fa80168..30d2528d2b5ea901f163b59f1977c559ccfa424f 100644 (file)
@@ -779,13 +779,13 @@ static int __init bfusb_init(void)
        return err;
 }
 
-static void __exit bfusb_cleanup(void)
+static void __exit bfusb_exit(void)
 {
        usb_deregister(&bfusb_driver);
 }
 
 module_init(bfusb_init);
-module_exit(bfusb_cleanup);
+module_exit(bfusb_exit);
 
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION);
index 80031f5ed9bbaefa567e76d8a8bec17799cd8d79..5964684d7527d2631ba5c86a0a097b821d25a7bd 100644 (file)
@@ -521,7 +521,7 @@ int bcsp_init(void);
 int bcsp_deinit(void);
 #endif
 
-int __init hci_uart_init(void)
+static int __init hci_uart_init(void)
 {
        static struct tty_ldisc hci_uart_ldisc;
        int err;
@@ -559,7 +559,7 @@ int __init hci_uart_init(void)
        return 0;
 }
 
-void hci_uart_cleanup(void)
+static void __exit hci_uart_exit(void)
 {
        int err;
 
@@ -576,7 +576,7 @@ void hci_uart_cleanup(void)
 }
 
 module_init(hci_uart_init);
-module_exit(hci_uart_cleanup);
+module_exit(hci_uart_exit);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
 MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION);
index 7af168947bdcb4d41b1b76b7c6cc6279543c9f1f..32e5a84264d3ea09c157b275be93e6151146eba1 100644 (file)
@@ -991,7 +991,7 @@ static struct usb_driver hci_usb_driver = {
        .id_table   =  bluetooth_ids,
 };
 
-int hci_usb_init(void)
+static int __init hci_usb_init(void)
 {
        int err;
 
@@ -1003,13 +1003,13 @@ int hci_usb_init(void)
        return err;
 }
 
-void hci_usb_cleanup(void)
+static void __exit hci_usb_exit(void)
 {
        usb_deregister(&hci_usb_driver);
 }
 
 module_init(hci_usb_init);
-module_exit(hci_usb_cleanup);
+module_exit(hci_usb_exit);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth HCI USB driver ver " VERSION);
index 1817c7919ce3eb009527b8690863bc8bd631483f..74b70f70e07771751aec410df42c6012091f481b 100644 (file)
@@ -323,7 +323,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
        return err;
 }
 
-struct net_proto_family bt_sock_family_ops = {
+static struct net_proto_family bt_sock_family_ops = {
        .owner  = THIS_MODULE,
        .family = PF_BLUETOOTH,
        .create = bt_sock_create,
@@ -364,7 +364,7 @@ static int __init bt_init(void)
        return 0;
 }
 
-static void __exit bt_cleanup(void)
+static void __exit bt_exit(void)
 {
        hci_sock_cleanup();
 
@@ -377,7 +377,7 @@ static void __exit bt_cleanup(void)
 }
 
 subsys_initcall(bt_init);
-module_exit(bt_cleanup);
+module_exit(bt_exit);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth Core ver " VERSION);
index 81d4e82cfa957a9c413c2559fe6d10f1c0743f84..5292b6c50975fa318a88b850fabccbebd32b4f8e 100644 (file)
@@ -672,7 +672,7 @@ int bnep_get_conninfo(struct bnep_conninfo *ci)
        return err;
 }
 
-static int  __init bnep_init_module(void)
+static int __init bnep_init(void)
 {      
        char flt[50] = "";
 
@@ -694,13 +694,13 @@ static int  __init bnep_init_module(void)
        return 0;
 }
 
-static void __exit bnep_cleanup_module(void)
+static void __exit bnep_exit(void)
 {
        bnep_sock_cleanup();
 }
 
-module_init(bnep_init_module);
-module_exit(bnep_cleanup_module);
+module_init(bnep_init);
+module_exit(bnep_exit);
 
 MODULE_AUTHOR("David Libault <david.libault@inventel.fr>, Maxim Krasnyansky <maxk@qualcomm.com>");
 MODULE_DESCRIPTION("Bluetooth BNEP ver " VERSION);
index d0d3d086e1c0b4a6f9420d79e570634e13e2ed9d..1aadecd45d7e8997408c89aeb9a289dc4763ac66 100644 (file)
@@ -482,7 +482,7 @@ int cmtp_get_conninfo(struct cmtp_conninfo *ci)
 }
 
 
-int __init init_cmtp(void)
+static int __init cmtp_init(void)
 {
        l2cap_load();
 
@@ -493,13 +493,13 @@ int __init init_cmtp(void)
        return 0;
 }
 
-void __exit exit_cmtp(void)
+static void __exit cmtp_exit(void)
 {
        cmtp_cleanup_sockets();
 }
 
-module_init(init_cmtp);
-module_exit(exit_cmtp);
+module_init(cmtp_init);
+module_exit(cmtp_exit);
 
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth CMTP ver " VERSION);
index 56a91a619743f05d22e616878d4cde3709bf9b90..68f32579885969722765b20a9c96bfb8b5fbf58a 100644 (file)
@@ -535,7 +535,7 @@ done:
        return err;
 }
 
-int l2cap_sock_listen(struct socket *sock, int backlog)
+static int l2cap_sock_listen(struct socket *sock, int backlog)
 {
        struct sock *sk = sock->sk;
        int err = 0;
@@ -563,7 +563,7 @@ done:
        return err;
 }
 
-int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int flags)
+static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int flags)
 {
        DECLARE_WAITQUEUE(wait, current);
        struct sock *sk = sock->sk, *nsk;
@@ -1051,7 +1051,7 @@ static void l2cap_chan_ready(struct sock *sk)
 }
 
 /* Copy frame to all raw sockets on that connection */
-void l2cap_raw_recv(struct l2cap_conn *conn, struct sk_buff *skb)
+static void l2cap_raw_recv(struct l2cap_conn *conn, struct sk_buff *skb)
 {
        struct l2cap_chan_list *l = &conn->chan_list;
        struct sk_buff *nskb;
@@ -2153,7 +2153,7 @@ static struct hci_proto l2cap_hci_proto = {
        .recv_acldata = l2cap_recv_acldata
 };
 
-int __init l2cap_init(void)
+static int __init l2cap_init(void)
 {
        int err;
 
@@ -2175,7 +2175,7 @@ int __init l2cap_init(void)
        return 0;
 }
 
-void __exit l2cap_cleanup(void)
+static void __exit l2cap_exit(void)
 {
        l2cap_proc_cleanup();
 
@@ -2197,7 +2197,7 @@ void l2cap_load(void)
 EXPORT_SYMBOL(l2cap_load);
 
 module_init(l2cap_init);
-module_exit(l2cap_cleanup);
+module_exit(l2cap_exit);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
 MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);
index 090ff6db0fb5973a51450ee5a85af146068a5b3a..2e7e3ec4c0a51d70b84743aea034a25a9fccb481 100644 (file)
@@ -1948,7 +1948,7 @@ static void __exit rfcomm_proc_cleanup(void)
 #endif /* CONFIG_PROC_FS */
 
 /* ---- Initialization ---- */
-int  __init rfcomm_init(void)
+static int __init rfcomm_init(void)
 {
        l2cap_load();
 
@@ -1967,7 +1967,7 @@ int  __init rfcomm_init(void)
        return 0;
 }
 
-void __exit rfcomm_cleanup(void)
+static void __exit rfcomm_exit(void)
 {
        /* Terminate working thread.
         * ie. Set terminate flag and wake it up */
@@ -1988,7 +1988,7 @@ void __exit rfcomm_cleanup(void)
 }
 
 module_init(rfcomm_init);
-module_exit(rfcomm_cleanup);
+module_exit(rfcomm_exit);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION);
index 4ccc42d2c904cc34dafc30768667d96b79c2998f..ab9053b8e150d8437268ae99ebf68d8c57bb8049 100644 (file)
@@ -194,7 +194,7 @@ static inline int sco_chan_add(struct sco_conn *conn, struct sock *sk, struct so
        return err;
 }
 
-int sco_connect(struct sock *sk)
+static int sco_connect(struct sock *sk)
 {
        bdaddr_t *src = &bt_sk(sk)->src;
        bdaddr_t *dst = &bt_sk(sk)->dst;
@@ -533,7 +533,7 @@ done:
        return err;
 }
 
-int sco_sock_listen(struct socket *sock, int backlog)
+static int sco_sock_listen(struct socket *sock, int backlog)
 {
        struct sock *sk = sock->sk;
        int err = 0;
@@ -556,7 +556,7 @@ done:
        return err;
 }
 
-int sco_sock_accept(struct socket *sock, struct socket *newsock, int flags)
+static int sco_sock_accept(struct socket *sock, struct socket *newsock, int flags)
 {
        DECLARE_WAITQUEUE(wait, current);
        struct sock *sk = sock->sk, *ch;
@@ -655,7 +655,7 @@ static int sco_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
        return err;
 }
 
-int sco_sock_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen)
+static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen)
 {
        struct sock *sk = sock->sk;
        int err = 0;
@@ -674,7 +674,7 @@ int sco_sock_setsockopt(struct socket *sock, int level, int optname, char *optva
        return err;
 }
 
-int sco_sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen)
+static int sco_sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen)
 {
        struct sock *sk = sock->sk;
        struct sco_options opts;
@@ -835,7 +835,7 @@ done:
 }
 
 /* ----- SCO interface with lower layer (HCI) ----- */
-int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
+static int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
 {
        BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));
 
@@ -843,7 +843,7 @@ int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
        return HCI_LM_ACCEPT;
 }
 
-int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
+static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
 {
        BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status);
 
@@ -862,7 +862,7 @@ int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
        return 0;
 }
 
-int sco_disconn_ind(struct hci_conn *hcon, __u8 reason)
+static int sco_disconn_ind(struct hci_conn *hcon, __u8 reason)
 {
        BT_DBG("hcon %p reason %d", hcon, reason);
 
@@ -873,7 +873,7 @@ int sco_disconn_ind(struct hci_conn *hcon, __u8 reason)
        return 0;
 }
 
-int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
+static int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
 {
        struct sco_conn *conn = hcon->sco_data;
 
@@ -1013,7 +1013,7 @@ static struct hci_proto sco_hci_proto = {
        .recv_scodata = sco_recv_scodata
 };
 
-int __init sco_init(void)
+static int __init sco_init(void)
 {
        int err;
 
@@ -1035,7 +1035,7 @@ int __init sco_init(void)
        return 0;
 }
 
-void __exit sco_cleanup(void)
+static void __exit sco_exit(void)
 {
        int err;
 
@@ -1050,7 +1050,7 @@ void __exit sco_cleanup(void)
 }
 
 module_init(sco_init);
-module_exit(sco_cleanup);
+module_exit(sco_exit);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
 MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION);