include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / atm / firestream.c
index 94ebc9d..6e600af 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/init.h>
 #include <linux/capability.h>
 #include <linux/bitops.h>
+#include <linux/slab.h>
 #include <asm/byteorder.h>
 #include <asm/system.h>
 #include <asm/string.h>
@@ -171,8 +172,8 @@ static char *res_strings[] = {
        "packet purged", 
        "packet ageing timeout", 
        "channel ageing timeout", 
-       "calculated lenght error", 
-       "programmed lenght limit error", 
+       "calculated length error", 
+       "programmed length limit error", 
        "aal5 crc32 error", 
        "oam transp or transpc crc10 error", 
        "reserved 25", 
@@ -331,8 +332,8 @@ module_param(fs_keystream, int, 0);
 #define FS_DEBUG_QSIZE   0x00001000
 
 
-#define func_enter() fs_dprintk (FS_DEBUG_FLOW, "fs: enter %s\n", __FUNCTION__)
-#define func_exit()  fs_dprintk (FS_DEBUG_FLOW, "fs: exit  %s\n", __FUNCTION__)
+#define func_enter() fs_dprintk(FS_DEBUG_FLOW, "fs: enter %s\n", __func__)
+#define func_exit()  fs_dprintk(FS_DEBUG_FLOW, "fs: exit  %s\n", __func__)
 
 
 static struct fs_dev *fs_boards = NULL;
@@ -978,6 +979,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
                /* Docs are vague about this atm_hdr field. By the way, the FS
                 * chip makes odd errors if lower bits are set.... -- REW */
                tc->atm_hdr =  (vpi << 20) | (vci << 4); 
+               tmc0 = 0;
                {
                        int pcr = atm_pcr_goal (txtp);
 
@@ -1243,7 +1245,7 @@ static int fs_getsockopt(struct atm_vcc *vcc,int level,int optname,
 
 
 static int fs_setsockopt(struct atm_vcc *vcc,int level,int optname,
-                        void __user *optval,int optlen)
+                        void __user *optval,unsigned int optlen)
 {
        func_enter ();
        func_exit ();
@@ -1596,7 +1598,7 @@ static irqreturn_t fs_irq (int irq, void *dev_id)
 
        /* print the bits in the ISR register. */
        if (fs_debug & FS_DEBUG_IRQ) {
-               /* The FS_DEBUG things are unneccesary here. But this way it is
+               /* The FS_DEBUG things are unnecessary here. But this way it is
                   clear for grep that these are debug prints. */
                fs_dprintk (FS_DEBUG_IRQ,  "IRQ status:");
                for (i=0;i<27;i++) 
@@ -1689,17 +1691,17 @@ static int __devinit fs_init (struct fs_dev *dev)
                  | (0 * SARMODE0_SHADEN) /* We don't use shadow registers. */
                  | (1 * SARMODE0_INTMODE_READCLEAR)
                  | (1 * SARMODE0_CWRE)
-                 | IS_FS50(dev)?SARMODE0_PRPWT_FS50_5: 
-                                SARMODE0_PRPWT_FS155_3
+                 | (IS_FS50(dev) ? SARMODE0_PRPWT_FS50_5:
+                         SARMODE0_PRPWT_FS155_3)
                  | (1 * SARMODE0_CALSUP_1)
-                 | IS_FS50 (dev)?(0
+                 | (IS_FS50(dev) ? (0
                                   | SARMODE0_RXVCS_32
                                   | SARMODE0_ABRVCS_32 
                                   | SARMODE0_TXVCS_32):
                                  (0
                                   | SARMODE0_RXVCS_1k
                                   | SARMODE0_ABRVCS_1k 
-                                  | SARMODE0_TXVCS_1k));
+                                  | SARMODE0_TXVCS_1k)));
 
        /* 10ms * 100 is 1 second. That should be enough, as AN3:9 says it takes
           1ms. */