static int maxframe[MAX_DEVICE_COUNT] = {0,};
static int dosyncppp[MAX_DEVICE_COUNT] = {1,1,1,1};
-/* The old way: bit map of interrupts to choose from */
-/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
-static u_int irq_mask = 0xdeb8;
-
-/* Newer, simpler way of listing specific interrupts */
-static int irq_list[4] = { -1 };
-
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
-
-MODULE_PARM(break_on_load,"i");
-MODULE_PARM(ttymajor,"i");
-MODULE_PARM(debug_level,"i");
-MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
-MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
+module_param(break_on_load, bool, 0);
+module_param(ttymajor, int, 0);
+module_param(debug_level, int, 0);
+module_param_array(maxframe, int, NULL, 0);
+module_param_array(dosyncppp, int, NULL, 0);
MODULE_LICENSE("GPL");
MGSLPC_INFO *info;
dev_link_t *link;
client_reg_t client_reg;
- int ret, i;
+ int ret;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("mgslpc_attach\n");
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
- if (irq_list[0] == -1)
- link->irq.IRQInfo2 = irq_mask;
- else
- for (i = 0; i < 4; i++)
- link->irq.IRQInfo2 |= 1 << irq_list[i];
link->irq.Handler = NULL;
link->conf.Attributes = 0;
dev_list = link;
client_reg.dev_info = &dev_info;
- client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
client_reg.EventMask =
CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
/* Return next bottom half action to perform.
* or 0 if nothing to do.
*/
-int bh_action(MGSLPC_INFO *info)
+static int bh_action(MGSLPC_INFO *info)
{
unsigned long flags;
int rc = 0;
}
/* eom: non-zero = end of frame */
-void rx_ready_hdlc(MGSLPC_INFO *info, int eom)
+static void rx_ready_hdlc(MGSLPC_INFO *info, int eom)
{
unsigned char data[2];
unsigned char fifo_count, read_count, i;
issue_command(info, CHA, CMD_RXFIFO);
}
-void rx_ready_async(MGSLPC_INFO *info, int tcd)
+static void rx_ready_async(MGSLPC_INFO *info, int tcd)
{
unsigned char data, status;
int fifo_count;
}
-void tx_done(MGSLPC_INFO *info)
+static void tx_done(MGSLPC_INFO *info)
{
if (!info->tx_active)
return;
}
}
-void tx_ready(MGSLPC_INFO *info)
+static void tx_ready(MGSLPC_INFO *info)
{
unsigned char fifo_count = 32;
int c;
}
}
-void cts_change(MGSLPC_INFO *info)
+static void cts_change(MGSLPC_INFO *info)
{
get_signals(info);
if ((info->cts_chkcount)++ >= IO_PIN_SHUTDOWN_LIMIT)
info->pending_bh |= BH_STATUS;
}
-void dcd_change(MGSLPC_INFO *info)
+static void dcd_change(MGSLPC_INFO *info)
{
get_signals(info);
if ((info->dcd_chkcount)++ >= IO_PIN_SHUTDOWN_LIMIT)
info->pending_bh |= BH_STATUS;
}
-void dsr_change(MGSLPC_INFO *info)
+static void dsr_change(MGSLPC_INFO *info)
{
get_signals(info);
if ((info->dsr_chkcount)++ >= IO_PIN_SHUTDOWN_LIMIT)
info->pending_bh |= BH_STATUS;
}
-void ri_change(MGSLPC_INFO *info)
+static void ri_change(MGSLPC_INFO *info)
{
get_signals(info);
if ((info->ri_chkcount)++ >= IO_PIN_SHUTDOWN_LIMIT)
/* Called to print information about devices
*/
-int mgslpc_read_proc(char *page, char **start, off_t off, int count,
+static int mgslpc_read_proc(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
int len = 0, l;
}
pcmcia_unregister_driver(&mgslpc_driver);
-
- /* XXX: this really needs to move into generic code.. */
- while (dev_list != NULL) {
- if (dev_list->state & DEV_CONFIG)
- mgslpc_release((u_long)dev_list);
- mgslpc_detach(dev_list);
- }
+ BUG_ON(dev_list != NULL);
}
static int __init synclink_cs_init(void)
module_init(synclink_cs_init);
module_exit(synclink_cs_exit);
-void mgslpc_set_rate(MGSLPC_INFO *info, unsigned char channel, unsigned int rate)
+static void mgslpc_set_rate(MGSLPC_INFO *info, unsigned char channel, unsigned int rate)
{
unsigned int M, N;
unsigned char val;
/* Enabled the AUX clock output at the specified frequency.
*/
-void enable_auxclk(MGSLPC_INFO *info)
+static void enable_auxclk(MGSLPC_INFO *info)
{
unsigned char val;