X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwan%2Fcycx_main.c;h=6e5f1c89851713f12ce45aaab040f36ca406d93d;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=20b6a29a1b9d731f49fdb6d708dd2fb0078e8b85;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c index 20b6a29a1..6e5f1c898 100644 --- a/drivers/net/wan/cycx_main.c +++ b/drivers/net/wan/cycx_main.c @@ -40,7 +40,6 @@ * 1998/08/08 acme Initial version. */ -#include /* OS configuration options */ #include /* offsetof(), etc. */ #include /* return codes */ #include /* inline memset(), etc. */ @@ -57,7 +56,7 @@ unsigned int cycx_debug; MODULE_AUTHOR("Arnaldo Carvalho de Melo"); MODULE_DESCRIPTION("Cyclom 2X Sync Card Driver."); MODULE_LICENSE("GPL"); -MODULE_PARM(cycx_debug, "i"); +module_param(cycx_debug, int, 0); MODULE_PARM_DESC(cycx_debug, "cyclomx debug level"); /* Defines & Macros */ @@ -75,7 +74,7 @@ static int cycx_wan_setup(struct wan_device *wandev, wandev_conf_t *conf); static int cycx_wan_shutdown(struct wan_device *wandev); /* Miscellaneous functions */ -static irqreturn_t cycx_isr(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t cycx_isr(int irq, void *dev_id); /* Global Data * Note: All data must be explicitly initialized!!! @@ -103,7 +102,7 @@ static struct cycx_device *cycx_card_array; /* adapter data space */ * < 0 error. * Context: process */ -int __init cycx_init(void) +static int __init cycx_init(void) { int cnt, err = -ENOMEM; @@ -223,13 +222,12 @@ static int cycx_wan_setup(struct wan_device *wandev, wandev_conf_t *conf) /* Configure hardware, load firmware, etc. */ memset(&card->hw, 0, sizeof(card->hw)); card->hw.irq = irq; - card->hw.dpmbase = (void *)conf->maddr; card->hw.dpmsize = CYCX_WINDOWSIZE; card->hw.fwid = CFID_X25_2X; - card->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&card->lock); init_waitqueue_head(&card->wait_stats); - rc = cycx_setup(&card->hw, conf->data, conf->data_size); + rc = cycx_setup(&card->hw, conf->data, conf->data_size, conf->maddr); if (rc) goto out_irq; @@ -303,11 +301,11 @@ out: return ret; * o acknowledge Cyclom 2X hardware interrupt. * o call protocol-specific interrupt service routine, if any. */ -static irqreturn_t cycx_isr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t cycx_isr(int irq, void *dev_id) { - struct cycx_device *card = (struct cycx_device *)dev_id; + struct cycx_device *card = dev_id; - if (!card || card->wandev.state == WAN_UNCONFIGURED) + if (card->wandev.state == WAN_UNCONFIGURED) goto out; if (card->in_isr) {