[SPARC64]: Provide mmu statistics via sysfs.
[sfrench/cifs-2.6.git] / arch / sparc64 / kernel / chmc.c
index 259f37e516f54f1e82d5c91169ede37faf3382d6..777d345770458358a089df7901486f048705142a 100644 (file)
@@ -341,15 +341,14 @@ static void fetch_decode_regs(struct mctrl_info *mp)
 
 static int init_one_mctrl(struct device_node *dp)
 {
-       struct mctrl_info *mp = kmalloc(sizeof(*mp), GFP_KERNEL);
+       struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL);
        int portid = of_getintprop_default(dp, "portid", -1);
-       struct linux_prom64_registers *regs;
-       void *pval;
+       const struct linux_prom64_registers *regs;
+       const void *pval;
        int len;
 
        if (!mp)
                return -1;
-       memset(mp, 0, sizeof(*mp));
        if (portid == -1)
                goto fail;