]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/hisax/config.c
[PATCH] chelsio: add support for other 10G boards
[linux-2.6-omap-h63xx.git] / drivers / isdn / hisax / config.c
index df9d652018198311f5d2b05d8e6e2ef81c7e81a9..785b08554fcaa3685a3115a965be95bccc1d72e1 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/types.h>
 #include <linux/stddef.h>
 #include <linux/timer.h>
-#include <linux/config.h>
 #include <linux/init.h>
 #include "hisax.h"
 #include <linux/module.h>
@@ -25,7 +24,6 @@
 #include <linux/workqueue.h>
 #include <linux/interrupt.h>
 #define HISAX_STATUS_BUFSIZE 4096
-#define INCLUDE_INLINE_FUNCS
 
 /*
  * This structure array contains one entry per card. An entry looks
@@ -633,7 +631,8 @@ static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel)
                count = cs->status_end - cs->status_read + 1;
                if (count >= len)
                        count = len;
-               copy_to_user(p, cs->status_read, count);
+               if (copy_to_user(p, cs->status_read, count))
+                       return -EFAULT;
                cs->status_read += count;
                if (cs->status_read > cs->status_end)
                        cs->status_read = cs->status_buf;
@@ -644,7 +643,8 @@ static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel)
                                cnt = HISAX_STATUS_BUFSIZE;
                        else
                                cnt = count;
-                       copy_to_user(p, cs->status_read, cnt);
+                       if (copy_to_user(p, cs->status_read, cnt))
+                               return -EFAULT;
                        p += cnt;
                        cs->status_read += cnt % HISAX_STATUS_BUFSIZE;
                        count -= cnt;
@@ -1723,11 +1723,11 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg)
                hisax_b_sched_event(bcs, B_RCVBUFREADY);
                break;
        case PH_DATA | CONFIRM:
-               bcs->tx_cnt -= (int) arg;
+               bcs->tx_cnt -= (long)arg;
                if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) {
                        u_long  flags;
                        spin_lock_irqsave(&bcs->aclock, flags);
-                       bcs->ackcnt += (int) arg;
+                       bcs->ackcnt += (long)arg;
                        spin_unlock_irqrestore(&bcs->aclock, flags);
                        schedule_event(bcs, B_ACKPENDING);
                }
@@ -1791,7 +1791,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg)
 
        switch (pr) {
        case PH_ACTIVATE | REQUEST:
-               B_L2L1(b_if, pr, (void *) st->l1.mode);
+               B_L2L1(b_if, pr, (void *)(unsigned long)st->l1.mode);
                break;
        case PH_DATA | REQUEST:
        case PH_PULL | INDICATION:
@@ -1877,7 +1877,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
 
-static struct pci_device_id hisax_pci_tbl[] __initdata = {
+static struct pci_device_id hisax_pci_tbl[] __devinitdata = {
 #ifdef CONFIG_HISAX_FRITZPCI
        {PCI_VENDOR_ID_AVM,      PCI_DEVICE_ID_AVM_A1,           PCI_ANY_ID, PCI_ANY_ID},
 #endif