Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-drm-fsl-dcu.git] / arch / arm / kernel / apm.c
index b9df1b782bb1128b72b30739dbc92671d14c8d2e..33c55689f999ea3f7bcd6f4955d339b4d08fd343 100644 (file)
@@ -10,7 +10,6 @@
  * [This document is available from Microsoft at:
  *    http://www.microsoft.com/hwdev/busbios/amp_12.htm]
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/poll.h>
 #include <linux/timer.h>
@@ -18,6 +17,7 @@
 #include <linux/proc_fs.h>
 #include <linux/miscdevice.h>
 #include <linux/apm_bios.h>
+#include <linux/capability.h>
 #include <linux/sched.h>
 #include <linux/pm.h>
 #include <linux/device.h>
@@ -356,10 +356,8 @@ static int apm_open(struct inode * inode, struct file * filp)
 {
        struct apm_user *as;
 
-       as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL);
+       as = (struct apm_user *)kzalloc(sizeof(*as), GFP_KERNEL);
        if (as) {
-               memset(as, 0, sizeof(*as));
-
                /*
                 * XXX - this is a tiny bit broken, when we consider BSD
                 * process accounting. If the device is opened by root, we