Commit 6e1e0801 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Marcel Holtmann

[Bluetooth] Make some functions static

This patch makes some needlessly global functions static.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 5df82859
...@@ -92,14 +92,14 @@ typedef struct bluecard_info_t { ...@@ -92,14 +92,14 @@ typedef struct bluecard_info_t {
} bluecard_info_t; } bluecard_info_t;
void bluecard_config(dev_link_t *link); static void bluecard_config(dev_link_t *link);
void bluecard_release(dev_link_t *link); static void bluecard_release(dev_link_t *link);
int bluecard_event(event_t event, int priority, event_callback_args_t *args); static int bluecard_event(event_t event, int priority, event_callback_args_t *args);
static dev_info_t dev_info = "bluecard_cs"; static dev_info_t dev_info = "bluecard_cs";
dev_link_t *bluecard_attach(void); static dev_link_t *bluecard_attach(void);
void bluecard_detach(dev_link_t *); static void bluecard_detach(dev_link_t *);
static dev_link_t *dev_list = NULL; static dev_link_t *dev_list = NULL;
...@@ -172,7 +172,7 @@ static dev_link_t *dev_list = NULL; ...@@ -172,7 +172,7 @@ static dev_link_t *dev_list = NULL;
/* ======================== LED handling routines ======================== */ /* ======================== LED handling routines ======================== */
void bluecard_activity_led_timeout(u_long arg) static void bluecard_activity_led_timeout(u_long arg)
{ {
bluecard_info_t *info = (bluecard_info_t *)arg; bluecard_info_t *info = (bluecard_info_t *)arg;
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
...@@ -721,7 +721,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l ...@@ -721,7 +721,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
int bluecard_open(bluecard_info_t *info) static int bluecard_open(bluecard_info_t *info)
{ {
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
struct hci_dev *hdev; struct hci_dev *hdev;
...@@ -839,7 +839,7 @@ int bluecard_open(bluecard_info_t *info) ...@@ -839,7 +839,7 @@ int bluecard_open(bluecard_info_t *info)
} }
int bluecard_close(bluecard_info_t *info) static int bluecard_close(bluecard_info_t *info)
{ {
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
struct hci_dev *hdev = info->hdev; struct hci_dev *hdev = info->hdev;
...@@ -866,7 +866,7 @@ int bluecard_close(bluecard_info_t *info) ...@@ -866,7 +866,7 @@ int bluecard_close(bluecard_info_t *info)
return 0; return 0;
} }
dev_link_t *bluecard_attach(void) static dev_link_t *bluecard_attach(void)
{ {
bluecard_info_t *info; bluecard_info_t *info;
client_reg_t client_reg; client_reg_t client_reg;
...@@ -924,7 +924,7 @@ dev_link_t *bluecard_attach(void) ...@@ -924,7 +924,7 @@ dev_link_t *bluecard_attach(void)
} }
void bluecard_detach(dev_link_t *link) static void bluecard_detach(dev_link_t *link)
{ {
bluecard_info_t *info = link->priv; bluecard_info_t *info = link->priv;
dev_link_t **linkp; dev_link_t **linkp;
...@@ -969,7 +969,7 @@ static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse ...@@ -969,7 +969,7 @@ static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse
return pcmcia_parse_tuple(handle, tuple, parse); return pcmcia_parse_tuple(handle, tuple, parse);
} }
void bluecard_config(dev_link_t *link) static void bluecard_config(dev_link_t *link)
{ {
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
bluecard_info_t *info = link->priv; bluecard_info_t *info = link->priv;
...@@ -1044,7 +1044,7 @@ void bluecard_config(dev_link_t *link) ...@@ -1044,7 +1044,7 @@ void bluecard_config(dev_link_t *link)
} }
void bluecard_release(dev_link_t *link) static void bluecard_release(dev_link_t *link)
{ {
bluecard_info_t *info = link->priv; bluecard_info_t *info = link->priv;
...@@ -1063,7 +1063,7 @@ void bluecard_release(dev_link_t *link) ...@@ -1063,7 +1063,7 @@ void bluecard_release(dev_link_t *link)
} }
int bluecard_event(event_t event, int priority, event_callback_args_t *args) static int bluecard_event(event_t event, int priority, event_callback_args_t *args)
{ {
dev_link_t *link = args->client_data; dev_link_t *link = args->client_data;
bluecard_info_t *info = link->priv; bluecard_info_t *info = link->priv;
......
...@@ -96,14 +96,14 @@ typedef struct bt3c_info_t { ...@@ -96,14 +96,14 @@ typedef struct bt3c_info_t {
} bt3c_info_t; } bt3c_info_t;
void bt3c_config(dev_link_t *link); static void bt3c_config(dev_link_t *link);
void bt3c_release(dev_link_t *link); static void bt3c_release(dev_link_t *link);
int bt3c_event(event_t event, int priority, event_callback_args_t *args); static int bt3c_event(event_t event, int priority, event_callback_args_t *args);
static dev_info_t dev_info = "bt3c_cs"; static dev_info_t dev_info = "bt3c_cs";
dev_link_t *bt3c_attach(void); static dev_link_t *bt3c_attach(void);
void bt3c_detach(dev_link_t *); static void bt3c_detach(dev_link_t *);
static dev_link_t *dev_list = NULL; static dev_link_t *dev_list = NULL;
...@@ -132,28 +132,28 @@ static dev_link_t *dev_list = NULL; ...@@ -132,28 +132,28 @@ static dev_link_t *dev_list = NULL;
#define CONTROL 4 #define CONTROL 4
inline void bt3c_address(unsigned int iobase, unsigned short addr) static inline void bt3c_address(unsigned int iobase, unsigned short addr)
{ {
outb(addr & 0xff, iobase + ADDR_L); outb(addr & 0xff, iobase + ADDR_L);
outb((addr >> 8) & 0xff, iobase + ADDR_H); outb((addr >> 8) & 0xff, iobase + ADDR_H);
} }
inline void bt3c_put(unsigned int iobase, unsigned short value) static inline void bt3c_put(unsigned int iobase, unsigned short value)
{ {
outb(value & 0xff, iobase + DATA_L); outb(value & 0xff, iobase + DATA_L);
outb((value >> 8) & 0xff, iobase + DATA_H); outb((value >> 8) & 0xff, iobase + DATA_H);
} }
inline void bt3c_io_write(unsigned int iobase, unsigned short addr, unsigned short value) static inline void bt3c_io_write(unsigned int iobase, unsigned short addr, unsigned short value)
{ {
bt3c_address(iobase, addr); bt3c_address(iobase, addr);
bt3c_put(iobase, value); bt3c_put(iobase, value);
} }
inline unsigned short bt3c_get(unsigned int iobase) static inline unsigned short bt3c_get(unsigned int iobase)
{ {
unsigned short value = inb(iobase + DATA_L); unsigned short value = inb(iobase + DATA_L);
...@@ -163,7 +163,7 @@ inline unsigned short bt3c_get(unsigned int iobase) ...@@ -163,7 +163,7 @@ inline unsigned short bt3c_get(unsigned int iobase)
} }
inline unsigned short bt3c_read(unsigned int iobase, unsigned short addr) static inline unsigned short bt3c_read(unsigned int iobase, unsigned short addr)
{ {
bt3c_address(iobase, addr); bt3c_address(iobase, addr);
...@@ -587,7 +587,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int co ...@@ -587,7 +587,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int co
} }
int bt3c_open(bt3c_info_t *info) static int bt3c_open(bt3c_info_t *info)
{ {
const struct firmware *firmware; const struct firmware *firmware;
struct hci_dev *hdev; struct hci_dev *hdev;
...@@ -657,7 +657,7 @@ int bt3c_open(bt3c_info_t *info) ...@@ -657,7 +657,7 @@ int bt3c_open(bt3c_info_t *info)
} }
int bt3c_close(bt3c_info_t *info) static int bt3c_close(bt3c_info_t *info)
{ {
struct hci_dev *hdev = info->hdev; struct hci_dev *hdev = info->hdev;
...@@ -674,7 +674,7 @@ int bt3c_close(bt3c_info_t *info) ...@@ -674,7 +674,7 @@ int bt3c_close(bt3c_info_t *info)
return 0; return 0;
} }
dev_link_t *bt3c_attach(void) static dev_link_t *bt3c_attach(void)
{ {
bt3c_info_t *info; bt3c_info_t *info;
client_reg_t client_reg; client_reg_t client_reg;
...@@ -732,7 +732,7 @@ dev_link_t *bt3c_attach(void) ...@@ -732,7 +732,7 @@ dev_link_t *bt3c_attach(void)
} }
void bt3c_detach(dev_link_t *link) static void bt3c_detach(dev_link_t *link)
{ {
bt3c_info_t *info = link->priv; bt3c_info_t *info = link->priv;
dev_link_t **linkp; dev_link_t **linkp;
...@@ -786,7 +786,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) ...@@ -786,7 +786,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
return get_tuple(handle, tuple, parse); return get_tuple(handle, tuple, parse);
} }
void bt3c_config(dev_link_t *link) static void bt3c_config(dev_link_t *link)
{ {
static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
...@@ -899,7 +899,7 @@ void bt3c_config(dev_link_t *link) ...@@ -899,7 +899,7 @@ void bt3c_config(dev_link_t *link)
} }
void bt3c_release(dev_link_t *link) static void bt3c_release(dev_link_t *link)
{ {
bt3c_info_t *info = link->priv; bt3c_info_t *info = link->priv;
...@@ -916,7 +916,7 @@ void bt3c_release(dev_link_t *link) ...@@ -916,7 +916,7 @@ void bt3c_release(dev_link_t *link)
} }
int bt3c_event(event_t event, int priority, event_callback_args_t *args) static int bt3c_event(event_t event, int priority, event_callback_args_t *args)
{ {
dev_link_t *link = args->client_data; dev_link_t *link = args->client_data;
bt3c_info_t *info = link->priv; bt3c_info_t *info = link->priv;
......
...@@ -92,14 +92,14 @@ typedef struct btuart_info_t { ...@@ -92,14 +92,14 @@ typedef struct btuart_info_t {
} btuart_info_t; } btuart_info_t;
void btuart_config(dev_link_t *link); static void btuart_config(dev_link_t *link);
void btuart_release(dev_link_t *link); static void btuart_release(dev_link_t *link);
int btuart_event(event_t event, int priority, event_callback_args_t *args); static int btuart_event(event_t event, int priority, event_callback_args_t *args);
static dev_info_t dev_info = "btuart_cs"; static dev_info_t dev_info = "btuart_cs";
dev_link_t *btuart_attach(void); static dev_link_t *btuart_attach(void);
void btuart_detach(dev_link_t *); static void btuart_detach(dev_link_t *);
static dev_link_t *dev_list = NULL; static dev_link_t *dev_list = NULL;
...@@ -492,7 +492,7 @@ static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned lon ...@@ -492,7 +492,7 @@ static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned lon
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
int btuart_open(btuart_info_t *info) static int btuart_open(btuart_info_t *info)
{ {
unsigned long flags; unsigned long flags;
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
...@@ -561,7 +561,7 @@ int btuart_open(btuart_info_t *info) ...@@ -561,7 +561,7 @@ int btuart_open(btuart_info_t *info)
} }
int btuart_close(btuart_info_t *info) static int btuart_close(btuart_info_t *info)
{ {
unsigned long flags; unsigned long flags;
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
...@@ -590,7 +590,7 @@ int btuart_close(btuart_info_t *info) ...@@ -590,7 +590,7 @@ int btuart_close(btuart_info_t *info)
return 0; return 0;
} }
dev_link_t *btuart_attach(void) static dev_link_t *btuart_attach(void)
{ {
btuart_info_t *info; btuart_info_t *info;
client_reg_t client_reg; client_reg_t client_reg;
...@@ -648,7 +648,7 @@ dev_link_t *btuart_attach(void) ...@@ -648,7 +648,7 @@ dev_link_t *btuart_attach(void)
} }
void btuart_detach(dev_link_t *link) static void btuart_detach(dev_link_t *link)
{ {
btuart_info_t *info = link->priv; btuart_info_t *info = link->priv;
dev_link_t **linkp; dev_link_t **linkp;
...@@ -702,7 +702,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) ...@@ -702,7 +702,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
return get_tuple(handle, tuple, parse); return get_tuple(handle, tuple, parse);
} }
void btuart_config(dev_link_t *link) static void btuart_config(dev_link_t *link)
{ {
static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
...@@ -816,7 +816,7 @@ void btuart_config(dev_link_t *link) ...@@ -816,7 +816,7 @@ void btuart_config(dev_link_t *link)
} }
void btuart_release(dev_link_t *link) static void btuart_release(dev_link_t *link)
{ {
btuart_info_t *info = link->priv; btuart_info_t *info = link->priv;
...@@ -833,7 +833,7 @@ void btuart_release(dev_link_t *link) ...@@ -833,7 +833,7 @@ void btuart_release(dev_link_t *link)
} }
int btuart_event(event_t event, int priority, event_callback_args_t *args) static int btuart_event(event_t event, int priority, event_callback_args_t *args)
{ {
dev_link_t *link = args->client_data; dev_link_t *link = args->client_data;
btuart_info_t *info = link->priv; btuart_info_t *info = link->priv;
......
...@@ -95,14 +95,14 @@ typedef struct dtl1_info_t { ...@@ -95,14 +95,14 @@ typedef struct dtl1_info_t {
} dtl1_info_t; } dtl1_info_t;
void dtl1_config(dev_link_t *link); static void dtl1_config(dev_link_t *link);
void dtl1_release(dev_link_t *link); static void dtl1_release(dev_link_t *link);
int dtl1_event(event_t event, int priority, event_callback_args_t *args); static int dtl1_event(event_t event, int priority, event_callback_args_t *args);
static dev_info_t dev_info = "dtl1_cs"; static dev_info_t dev_info = "dtl1_cs";
dev_link_t *dtl1_attach(void); static dev_link_t *dtl1_attach(void);
void dtl1_detach(dev_link_t *); static void dtl1_detach(dev_link_t *);
static dev_link_t *dev_list = NULL; static dev_link_t *dev_list = NULL;
...@@ -469,7 +469,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long ...@@ -469,7 +469,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
int dtl1_open(dtl1_info_t *info) static int dtl1_open(dtl1_info_t *info)
{ {
unsigned long flags; unsigned long flags;
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
...@@ -540,7 +540,7 @@ int dtl1_open(dtl1_info_t *info) ...@@ -540,7 +540,7 @@ int dtl1_open(dtl1_info_t *info)
} }
int dtl1_close(dtl1_info_t *info) static int dtl1_close(dtl1_info_t *info)
{ {
unsigned long flags; unsigned long flags;
unsigned int iobase = info->link.io.BasePort1; unsigned int iobase = info->link.io.BasePort1;
...@@ -569,7 +569,7 @@ int dtl1_close(dtl1_info_t *info) ...@@ -569,7 +569,7 @@ int dtl1_close(dtl1_info_t *info)
return 0; return 0;
} }
dev_link_t *dtl1_attach(void) static dev_link_t *dtl1_attach(void)
{ {
dtl1_info_t *info; dtl1_info_t *info;
client_reg_t client_reg; client_reg_t client_reg;
...@@ -627,7 +627,7 @@ dev_link_t *dtl1_attach(void) ...@@ -627,7 +627,7 @@ dev_link_t *dtl1_attach(void)
} }
void dtl1_detach(dev_link_t *link) static void dtl1_detach(dev_link_t *link)
{ {
dtl1_info_t *info = link->priv; dtl1_info_t *info = link->priv;
dev_link_t **linkp; dev_link_t **linkp;
...@@ -681,7 +681,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) ...@@ -681,7 +681,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
return get_tuple(handle, tuple, parse); return get_tuple(handle, tuple, parse);
} }
void dtl1_config(dev_link_t *link) static void dtl1_config(dev_link_t *link)
{ {
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
dtl1_info_t *info = link->priv; dtl1_info_t *info = link->priv;
...@@ -768,7 +768,7 @@ void dtl1_config(dev_link_t *link) ...@@ -768,7 +768,7 @@ void dtl1_config(dev_link_t *link)
} }
void dtl1_release(dev_link_t *link) static void dtl1_release(dev_link_t *link)
{ {
dtl1_info_t *info = link->priv; dtl1_info_t *info = link->priv;
...@@ -785,7 +785,7 @@ void dtl1_release(dev_link_t *link) ...@@ -785,7 +785,7 @@ void dtl1_release(dev_link_t *link)
} }
int dtl1_event(event_t event, int priority, event_callback_args_t *args) static int dtl1_event(event_t event, int priority, event_callback_args_t *args)
{ {
dev_link_t *link = args->client_data; dev_link_t *link = args->client_data;
dtl1_info_t *info = link->priv; dtl1_info_t *info = link->priv;
......
...@@ -120,7 +120,7 @@ static struct usb_device_id blacklist_ids[] = { ...@@ -120,7 +120,7 @@ static struct usb_device_id blacklist_ids[] = {
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
struct _urb *_urb_alloc(int isoc, int gfp) static struct _urb *_urb_alloc(int isoc, int gfp)
{ {
struct _urb *_urb = kmalloc(sizeof(struct _urb) + struct _urb *_urb = kmalloc(sizeof(struct _urb) +
sizeof(struct usb_iso_packet_descriptor) * isoc, gfp); sizeof(struct usb_iso_packet_descriptor) * isoc, gfp);
...@@ -131,7 +131,7 @@ struct _urb *_urb_alloc(int isoc, int gfp) ...@@ -131,7 +131,7 @@ struct _urb *_urb_alloc(int isoc, int gfp)
return _urb; return _urb;
} }
struct _urb *_urb_dequeue(struct _urb_queue *q) static struct _urb *_urb_dequeue(struct _urb_queue *q)
{ {
struct _urb *_urb = NULL; struct _urb *_urb = NULL;
unsigned long flags; unsigned long flags;
...@@ -805,7 +805,7 @@ static void hci_usb_notify(struct hci_dev *hdev, unsigned int evt) ...@@ -805,7 +805,7 @@ static void hci_usb_notify(struct hci_dev *hdev, unsigned int evt)
BT_DBG("%s evt %d", hdev->name, evt); BT_DBG("%s evt %d", hdev->name, evt);
} }
int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{ {
struct usb_device *udev = interface_to_usbdev(intf); struct usb_device *udev = interface_to_usbdev(intf);
struct usb_host_endpoint *bulk_out_ep = NULL; struct usb_host_endpoint *bulk_out_ep = NULL;
......
...@@ -56,8 +56,6 @@ struct _urb { ...@@ -56,8 +56,6 @@ struct _urb {
struct urb urb; struct urb urb;
}; };
struct _urb *_urb_alloc(int isoc, int gfp);
static inline void _urb_free(struct _urb *_urb) static inline void _urb_free(struct _urb *_urb)
{ {
kfree(_urb); kfree(_urb);
...@@ -96,8 +94,6 @@ static inline void _urb_unlink(struct _urb *_urb) ...@@ -96,8 +94,6 @@ static inline void _urb_unlink(struct _urb *_urb)
} }
} }
struct _urb *_urb_dequeue(struct _urb_queue *q);
struct hci_usb { struct hci_usb {
struct hci_dev *hdev; struct hci_dev *hdev;
......
...@@ -338,7 +338,7 @@ static struct miscdevice hci_vhci_miscdev= ...@@ -338,7 +338,7 @@ static struct miscdevice hci_vhci_miscdev=
&hci_vhci_fops &hci_vhci_fops
}; };
int __init hci_vhci_init(void) static int __init hci_vhci_init(void)
{ {
BT_INFO("VHCI driver ver %s", VERSION); BT_INFO("VHCI driver ver %s", VERSION);
...@@ -350,7 +350,7 @@ int __init hci_vhci_init(void) ...@@ -350,7 +350,7 @@ int __init hci_vhci_init(void)
return 0; return 0;
} }
void hci_vhci_cleanup(void) static void hci_vhci_cleanup(void)
{ {
misc_deregister(&hci_vhci_miscdev); misc_deregister(&hci_vhci_miscdev);
} }
......
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