upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / drivers / bluetooth / bt3c_cs.c
index d67d038..a50adb6 100644 (file)
 #include <linux/ptrace.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
+#include <linux/moduleparam.h>
 
 #include <linux/skbuff.h>
 #include <linux/string.h>
 #include <linux/serial.h>
 #include <linux/serial_reg.h>
+#include <linux/bitops.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 
 #include <linux/device.h>
 
 
 /* Bit map of interrupts to choose from */
-static u_int irq_mask = 0xffff;
+static unsigned int irq_mask = 0xffff;
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, uint, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>, Jose Orlando Pereira <jop@di.uminho.pt>");
 MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card");
@@ -95,14 +96,14 @@ typedef struct bt3c_info_t {
 } bt3c_info_t;
 
 
-void bt3c_config(dev_link_t *link);
-void bt3c_release(dev_link_t *link);
-int bt3c_event(event_t event, int priority, event_callback_args_t *args);
+static void bt3c_config(dev_link_t *link);
+static void bt3c_release(dev_link_t *link);
+static int bt3c_event(event_t event, int priority, event_callback_args_t *args);
 
 static dev_info_t dev_info = "bt3c_cs";
 
-dev_link_t *bt3c_attach(void);
-void bt3c_detach(dev_link_t *);
+static dev_link_t *bt3c_attach(void);
+static void bt3c_detach(dev_link_t *);
 
 static dev_link_t *dev_list = NULL;
 
@@ -131,28 +132,28 @@ static dev_link_t *dev_list = NULL;
 #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 >> 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 >> 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_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);
 
@@ -162,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);
 
@@ -489,13 +490,10 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
 
 static struct device *bt3c_device(void)
 {
-       static char *kobj_name = "bt3c";
-
        static struct device dev = {
                .bus_id = "pcmcia",
        };
-       dev.kobj.k_name = kmalloc(strlen(kobj_name) + 1, GFP_KERNEL);
-       strcpy(dev.kobj.k_name, kobj_name);
+       kobject_set_name(&dev.kobj, "bt3c");
        kobject_init(&dev.kobj);
 
        return &dev;
@@ -586,7 +584,7 @@ error:
 }
 
 
-int bt3c_open(bt3c_info_t *info)
+static int bt3c_open(bt3c_info_t *info)
 {
        const struct firmware *firmware;
        struct hci_dev *hdev;
@@ -656,7 +654,7 @@ error:
 }
 
 
-int bt3c_close(bt3c_info_t *info)
+static int bt3c_close(bt3c_info_t *info)
 {
        struct hci_dev *hdev = info->hdev;
 
@@ -673,7 +671,7 @@ int bt3c_close(bt3c_info_t *info)
        return 0;
 }
 
-dev_link_t *bt3c_attach(void)
+static dev_link_t *bt3c_attach(void)
 {
        bt3c_info_t *info;
        client_reg_t client_reg;
@@ -731,7 +729,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;
        dev_link_t **linkp;
@@ -785,7 +783,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *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 };
        client_handle_t handle = link->handle;
@@ -898,7 +896,7 @@ failed:
 }
 
 
-void bt3c_release(dev_link_t *link)
+static void bt3c_release(dev_link_t *link)
 {
        bt3c_info_t *info = link->priv;
 
@@ -915,7 +913,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;
        bt3c_info_t *info = link->priv;