Commit 784d9e34 authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Move function exports out of syms.c

With Linux 2.6 there is no need to keep the function exports in a
central file and thus the use of syms.c makes no real sense. Remove
it and add the EXPORT_SYMBOL calls to the functions they belong to.
parent ca09bcc9
...@@ -9,4 +9,4 @@ obj-$(CONFIG_BT_RFCOMM) += rfcomm/ ...@@ -9,4 +9,4 @@ obj-$(CONFIG_BT_RFCOMM) += rfcomm/
obj-$(CONFIG_BT_BNEP) += bnep/ obj-$(CONFIG_BT_BNEP) += bnep/
obj-$(CONFIG_BT_CMTP) += cmtp/ obj-$(CONFIG_BT_CMTP) += cmtp/
bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o syms.o bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
#endif #endif
struct proc_dir_entry *proc_bt; struct proc_dir_entry *proc_bt;
EXPORT_SYMBOL(proc_bt);
/* Bluetooth sockets */ /* Bluetooth sockets */
#define BT_MAX_PROTO 6 #define BT_MAX_PROTO 6
...@@ -75,6 +76,7 @@ int bt_sock_register(int proto, struct net_proto_family *ops) ...@@ -75,6 +76,7 @@ int bt_sock_register(int proto, struct net_proto_family *ops)
bt_proto[proto] = ops; bt_proto[proto] = ops;
return 0; return 0;
} }
EXPORT_SYMBOL(bt_sock_register);
int bt_sock_unregister(int proto) int bt_sock_unregister(int proto)
{ {
...@@ -87,6 +89,7 @@ int bt_sock_unregister(int proto) ...@@ -87,6 +89,7 @@ int bt_sock_unregister(int proto)
bt_proto[proto] = NULL; bt_proto[proto] = NULL;
return 0; return 0;
} }
EXPORT_SYMBOL(bt_sock_unregister);
static int bt_sock_create(struct socket *sock, int proto) static int bt_sock_create(struct socket *sock, int proto)
{ {
...@@ -136,6 +139,7 @@ struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio ...@@ -136,6 +139,7 @@ struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio
return sk; return sk;
} }
EXPORT_SYMBOL(bt_sock_alloc);
void bt_sock_link(struct bt_sock_list *l, struct sock *sk) void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
{ {
...@@ -143,6 +147,7 @@ void bt_sock_link(struct bt_sock_list *l, struct sock *sk) ...@@ -143,6 +147,7 @@ void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
sk_add_node(sk, &l->head); sk_add_node(sk, &l->head);
write_unlock_bh(&l->lock); write_unlock_bh(&l->lock);
} }
EXPORT_SYMBOL(bt_sock_link);
void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
{ {
...@@ -150,6 +155,7 @@ void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) ...@@ -150,6 +155,7 @@ void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
sk_del_node_init(sk); sk_del_node_init(sk);
write_unlock_bh(&l->lock); write_unlock_bh(&l->lock);
} }
EXPORT_SYMBOL(bt_sock_unlink);
void bt_accept_enqueue(struct sock *parent, struct sock *sk) void bt_accept_enqueue(struct sock *parent, struct sock *sk)
{ {
...@@ -160,6 +166,7 @@ void bt_accept_enqueue(struct sock *parent, struct sock *sk) ...@@ -160,6 +166,7 @@ void bt_accept_enqueue(struct sock *parent, struct sock *sk)
bt_sk(sk)->parent = parent; bt_sk(sk)->parent = parent;
parent->sk_ack_backlog++; parent->sk_ack_backlog++;
} }
EXPORT_SYMBOL(bt_accept_enqueue);
static void bt_accept_unlink(struct sock *sk) static void bt_accept_unlink(struct sock *sk)
{ {
...@@ -199,6 +206,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock) ...@@ -199,6 +206,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL(bt_accept_dequeue);
int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t len, int flags) struct msghdr *msg, size_t len, int flags)
...@@ -235,6 +243,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, ...@@ -235,6 +243,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
return err ? : copied; return err ? : copied;
} }
EXPORT_SYMBOL(bt_sock_recvmsg);
static inline unsigned int bt_accept_poll(struct sock *parent) static inline unsigned int bt_accept_poll(struct sock *parent)
{ {
...@@ -287,6 +296,7 @@ unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *w ...@@ -287,6 +296,7 @@ unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *w
return mask; return mask;
} }
EXPORT_SYMBOL(bt_sock_poll);
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
{ {
...@@ -322,6 +332,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) ...@@ -322,6 +332,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
remove_wait_queue(sk->sk_sleep, &wait); remove_wait_queue(sk->sk_sleep, &wait);
return err; return err;
} }
EXPORT_SYMBOL(bt_sock_wait_state);
static struct net_proto_family bt_sock_family_ops = { static struct net_proto_family bt_sock_family_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -252,6 +252,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src) ...@@ -252,6 +252,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
read_unlock_bh(&hci_dev_list_lock); read_unlock_bh(&hci_dev_list_lock);
return hdev; return hdev;
} }
EXPORT_SYMBOL(hci_get_route);
/* Create SCO or ACL connection. /* Create SCO or ACL connection.
* Device _must_ be locked */ * Device _must_ be locked */
...@@ -294,6 +295,7 @@ struct hci_conn * hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst) ...@@ -294,6 +295,7 @@ struct hci_conn * hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst)
return acl; return acl;
} }
} }
EXPORT_SYMBOL(hci_connect);
/* Authenticate remote device */ /* Authenticate remote device */
int hci_conn_auth(struct hci_conn *conn) int hci_conn_auth(struct hci_conn *conn)
...@@ -310,6 +312,7 @@ int hci_conn_auth(struct hci_conn *conn) ...@@ -310,6 +312,7 @@ int hci_conn_auth(struct hci_conn *conn)
} }
return 0; return 0;
} }
EXPORT_SYMBOL(hci_conn_auth);
/* Enable encryption */ /* Enable encryption */
int hci_conn_encrypt(struct hci_conn *conn) int hci_conn_encrypt(struct hci_conn *conn)
...@@ -330,6 +333,7 @@ int hci_conn_encrypt(struct hci_conn *conn) ...@@ -330,6 +333,7 @@ int hci_conn_encrypt(struct hci_conn *conn)
} }
return 0; return 0;
} }
EXPORT_SYMBOL(hci_conn_encrypt);
/* Drop all connection on the device */ /* Drop all connection on the device */
void hci_conn_hash_flush(struct hci_dev *hdev) void hci_conn_hash_flush(struct hci_dev *hdev)
......
...@@ -288,6 +288,7 @@ struct hci_dev *hci_dev_get(int index) ...@@ -288,6 +288,7 @@ struct hci_dev *hci_dev_get(int index)
read_unlock(&hci_dev_list_lock); read_unlock(&hci_dev_list_lock);
return hdev; return hdev;
} }
EXPORT_SYMBOL(hci_dev_get);
/* ---- Inquiry support ---- */ /* ---- Inquiry support ---- */
void inquiry_cache_flush(struct hci_dev *hdev) void inquiry_cache_flush(struct hci_dev *hdev)
...@@ -779,6 +780,7 @@ struct hci_dev *hci_alloc_dev(void) ...@@ -779,6 +780,7 @@ struct hci_dev *hci_alloc_dev(void)
return hdev; return hdev;
} }
EXPORT_SYMBOL(hci_alloc_dev);
/* Free HCI device */ /* Free HCI device */
void hci_free_dev(struct hci_dev *hdev) void hci_free_dev(struct hci_dev *hdev)
...@@ -786,6 +788,7 @@ void hci_free_dev(struct hci_dev *hdev) ...@@ -786,6 +788,7 @@ void hci_free_dev(struct hci_dev *hdev)
/* will free via class release */ /* will free via class release */
class_device_put(&hdev->class_dev); class_device_put(&hdev->class_dev);
} }
EXPORT_SYMBOL(hci_free_dev);
/* Register HCI device */ /* Register HCI device */
int hci_register_dev(struct hci_dev *hdev) int hci_register_dev(struct hci_dev *hdev)
...@@ -845,6 +848,7 @@ int hci_register_dev(struct hci_dev *hdev) ...@@ -845,6 +848,7 @@ int hci_register_dev(struct hci_dev *hdev)
return id; return id;
} }
EXPORT_SYMBOL(hci_register_dev);
/* Unregister HCI device */ /* Unregister HCI device */
int hci_unregister_dev(struct hci_dev *hdev) int hci_unregister_dev(struct hci_dev *hdev)
...@@ -864,6 +868,7 @@ int hci_unregister_dev(struct hci_dev *hdev) ...@@ -864,6 +868,7 @@ int hci_unregister_dev(struct hci_dev *hdev)
__hci_dev_put(hdev); __hci_dev_put(hdev);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_unregister_dev);
/* Suspend HCI device */ /* Suspend HCI device */
int hci_suspend_dev(struct hci_dev *hdev) int hci_suspend_dev(struct hci_dev *hdev)
...@@ -871,6 +876,7 @@ int hci_suspend_dev(struct hci_dev *hdev) ...@@ -871,6 +876,7 @@ int hci_suspend_dev(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_SUSPEND); hci_notify(hdev, HCI_DEV_SUSPEND);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_suspend_dev);
/* Resume HCI device */ /* Resume HCI device */
int hci_resume_dev(struct hci_dev *hdev) int hci_resume_dev(struct hci_dev *hdev)
...@@ -878,6 +884,7 @@ int hci_resume_dev(struct hci_dev *hdev) ...@@ -878,6 +884,7 @@ int hci_resume_dev(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_RESUME); hci_notify(hdev, HCI_DEV_RESUME);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_resume_dev);
/* ---- Interface to upper protocols ---- */ /* ---- Interface to upper protocols ---- */
...@@ -903,6 +910,7 @@ int hci_register_proto(struct hci_proto *hp) ...@@ -903,6 +910,7 @@ int hci_register_proto(struct hci_proto *hp)
return err; return err;
} }
EXPORT_SYMBOL(hci_register_proto);
int hci_unregister_proto(struct hci_proto *hp) int hci_unregister_proto(struct hci_proto *hp)
{ {
...@@ -924,6 +932,7 @@ int hci_unregister_proto(struct hci_proto *hp) ...@@ -924,6 +932,7 @@ int hci_unregister_proto(struct hci_proto *hp)
return err; return err;
} }
EXPORT_SYMBOL(hci_unregister_proto);
static int hci_send_frame(struct sk_buff *skb) static int hci_send_frame(struct sk_buff *skb)
{ {
...@@ -980,6 +989,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 ogf, __u16 ocf, __u32 plen, void *p ...@@ -980,6 +989,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 ogf, __u16 ocf, __u32 plen, void *p
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_cmd);
/* Get data from the previously sent command */ /* Get data from the previously sent command */
void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf) void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf)
...@@ -1056,6 +1066,7 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) ...@@ -1056,6 +1066,7 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags)
hci_sched_tx(hdev); hci_sched_tx(hdev);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_acl);
/* Send SCO data */ /* Send SCO data */
int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
...@@ -1082,6 +1093,7 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) ...@@ -1082,6 +1093,7 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
hci_sched_tx(hdev); hci_sched_tx(hdev);
return 0; return 0;
} }
EXPORT_SYMBOL(hci_send_sco);
/* ---- HCI TX task (outgoing data) ---- */ /* ---- HCI TX task (outgoing data) ---- */
......
...@@ -940,3 +940,4 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data) ...@@ -940,3 +940,4 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data)
hci_send_to_sock(hdev, skb); hci_send_to_sock(hdev, skb);
kfree_skb(skb); kfree_skb(skb);
} }
EXPORT_SYMBOL(hci_si_event);
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
* $Id: lib.c,v 1.1 2002/03/08 21:06:59 maxk Exp $ * $Id: lib.c,v 1.1 2002/03/08 21:06:59 maxk Exp $
*/ */
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/string.h> #include <linux/string.h>
...@@ -58,6 +61,7 @@ void bt_dump(char *pref, __u8 *buf, int count) ...@@ -58,6 +61,7 @@ void bt_dump(char *pref, __u8 *buf, int count)
if (line[0]) if (line[0])
printk(KERN_INFO "%s:%s\n", pref, line); printk(KERN_INFO "%s:%s\n", pref, line);
} }
EXPORT_SYMBOL(bt_dump);
void baswap(bdaddr_t *dst, bdaddr_t *src) void baswap(bdaddr_t *dst, bdaddr_t *src)
{ {
...@@ -68,6 +72,7 @@ void baswap(bdaddr_t *dst, bdaddr_t *src) ...@@ -68,6 +72,7 @@ void baswap(bdaddr_t *dst, bdaddr_t *src)
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
d[i] = s[5 - i]; d[i] = s[5 - i];
} }
EXPORT_SYMBOL(baswap);
char *batostr(bdaddr_t *ba) char *batostr(bdaddr_t *ba)
{ {
...@@ -81,6 +86,7 @@ char *batostr(bdaddr_t *ba) ...@@ -81,6 +86,7 @@ char *batostr(bdaddr_t *ba)
return str[i]; return str[i];
} }
EXPORT_SYMBOL(batostr);
/* Bluetooth error codes to Unix errno mapping */ /* Bluetooth error codes to Unix errno mapping */
int bt_err(__u16 code) int bt_err(__u16 code)
...@@ -173,3 +179,4 @@ int bt_err(__u16 code) ...@@ -173,3 +179,4 @@ int bt_err(__u16 code)
return ENOSYS; return ENOSYS;
} }
} }
EXPORT_SYMBOL(bt_err);
/*
BlueZ - Bluetooth protocol stack for Linux
Copyright (C) 2000-2001 Qualcomm Incorporated
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation;
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
SOFTWARE IS DISCLAIMED.
*/
/*
* Bluetooth symbols.
*
* $Id: syms.c,v 1.1 2002/03/08 21:06:59 maxk Exp $
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/socket.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
/* HCI Core */
EXPORT_SYMBOL(hci_alloc_dev);
EXPORT_SYMBOL(hci_free_dev);
EXPORT_SYMBOL(hci_register_dev);
EXPORT_SYMBOL(hci_unregister_dev);
EXPORT_SYMBOL(hci_suspend_dev);
EXPORT_SYMBOL(hci_resume_dev);
EXPORT_SYMBOL(hci_register_proto);
EXPORT_SYMBOL(hci_unregister_proto);
EXPORT_SYMBOL(hci_get_route);
EXPORT_SYMBOL(hci_connect);
EXPORT_SYMBOL(hci_dev_get);
EXPORT_SYMBOL(hci_conn_auth);
EXPORT_SYMBOL(hci_conn_encrypt);
EXPORT_SYMBOL(hci_send_acl);
EXPORT_SYMBOL(hci_send_sco);
EXPORT_SYMBOL(hci_send_cmd);
EXPORT_SYMBOL(hci_si_event);
/* Bluetooth lib */
EXPORT_SYMBOL(bt_dump);
EXPORT_SYMBOL(baswap);
EXPORT_SYMBOL(batostr);
EXPORT_SYMBOL(bt_err);
/* Bluetooth sockets */
EXPORT_SYMBOL(bt_sock_register);
EXPORT_SYMBOL(bt_sock_unregister);
EXPORT_SYMBOL(bt_sock_alloc);
EXPORT_SYMBOL(bt_sock_link);
EXPORT_SYMBOL(bt_sock_unlink);
EXPORT_SYMBOL(bt_sock_recvmsg);
EXPORT_SYMBOL(bt_sock_poll);
EXPORT_SYMBOL(bt_accept_enqueue);
EXPORT_SYMBOL(bt_accept_dequeue);
EXPORT_SYMBOL(bt_sock_wait_state);
EXPORT_SYMBOL(proc_bt);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment