]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/prism54/oid_mgt.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / prism54 / oid_mgt.c
index e6cf9df2c20655699618bd3f18595a99862772e3..57a4ac34bed6cd2eefcb9034ae5a85ec75bfc642 100644 (file)
@@ -16,6 +16,8 @@
  *
  */
 
+#include <linux/kernel.h>
+
 #include "prismcompat.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"
@@ -242,13 +244,11 @@ mgt_init(islpci_private *priv)
        /* Alloc the cache */
        for (i = 0; i < OID_NUM_LAST; i++) {
                if (isl_oid[i].flags & OID_FLAG_CACHED) {
-                       priv->mib[i] = kmalloc(isl_oid[i].size *
+                       priv->mib[i] = kzalloc(isl_oid[i].size *
                                               (isl_oid[i].range + 1),
                                               GFP_KERNEL);
                        if (!priv->mib[i])
                                return -ENOMEM;
-                       memset(priv->mib[i], 0,
-                              isl_oid[i].size * (isl_oid[i].range + 1));
                } else
                        priv->mib[i] = NULL;
        }
@@ -692,7 +692,7 @@ mgt_update_addr(islpci_private *priv)
        return ret;
 }
 
-#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0]))
+#define VEC_SIZE(a) ARRAY_SIZE(a)
 
 int
 mgt_commit(islpci_private *priv)