]> err.no Git - linux-2.6/blobdiff - net/wanrouter/wanmain.c
Fix misc .c/.h comment typos
[linux-2.6] / net / wanrouter / wanmain.c
index bcf7b3faa76a4020d6308f5998fead39cce7b961..316211d9f17d97ffeab6823778c03113cdd5a76a 100644 (file)
@@ -3,7 +3,7 @@
 *
 *              This module is completely hardware-independent and provides
 *              the following common services for the WAN Link Drivers:
-*               o WAN device managenment (registering, unregistering)
+*               o WAN device management (registering, unregistering)
 *               o Network interface management
 *               o Physical connection management (dial-up, incoming calls)
 *               o Logical connection management (switched virtual circuits)
@@ -42,8 +42,8 @@
 * Jun 02, 1999  Gideon Hack    Updates for Linux 2.0.X and 2.2.X kernels.
 *****************************************************************************/
 
-#include <linux/config.h>
 #include <linux/stddef.h>      /* offsetof(), etc. */
+#include <linux/capability.h>
 #include <linux/errno.h>       /* return codes */
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -642,18 +642,16 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
 
        if (cnf->config_id == WANCONFIG_MPPP) {
 #ifdef CONFIG_WANPIPE_MULTPPP
-               pppdev = kmalloc(sizeof(struct ppp_device), GFP_KERNEL);
+               pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL);
                err = -ENOBUFS;
                if (pppdev == NULL)
                        goto out;
-               memset(pppdev, 0, sizeof(struct ppp_device));
-               pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
+               pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
                if (pppdev->dev == NULL) {
                        kfree(pppdev);
                        err = -ENOBUFS;
                        goto out;
                }
-               memset(pppdev->dev, 0, sizeof(struct net_device));
                err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
                dev = pppdev->dev;
 #else
@@ -663,11 +661,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
                goto out;
 #endif
        } else {
-               dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
+               dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
                err = -ENOBUFS;
                if (dev == NULL)
                        goto out;
-               memset(dev, 0, sizeof(struct net_device));
                err = wandev->new_if(wandev, dev, cnf);
        }