From: Pekka Enberg This patch converts kcalloc(1, ...) calls to use the new kzalloc() function. Signed-off-by: Pekka Enberg Cc: Vojtech Pavlik Signed-off-by: Andrew Morton --- drivers/input/gameport/emu10k1-gp.c | 2 +- drivers/input/gameport/fm801-gp.c | 2 +- drivers/input/gameport/ns558.c | 4 ++-- drivers/input/joystick/a3d.c | 2 +- drivers/input/joystick/adi.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/joystick/cobra.c | 2 +- drivers/input/joystick/db9.c | 2 +- drivers/input/joystick/gamecon.c | 2 +- drivers/input/joystick/gf2k.c | 2 +- drivers/input/joystick/grip.c | 2 +- drivers/input/joystick/grip_mp.c | 2 +- drivers/input/joystick/guillemot.c | 2 +- drivers/input/joystick/interact.c | 2 +- drivers/input/joystick/sidewinder.c | 2 +- drivers/input/joystick/tmdc.c | 2 +- drivers/input/joystick/turbografx.c | 2 +- drivers/input/keyboard/corgikbd.c | 2 +- drivers/input/mouse/psmouse-base.c | 2 +- drivers/input/serio/serport.c | 4 ++-- 20 files changed, 22 insertions(+), 22 deletions(-) diff -puN drivers/input/gameport/emu10k1-gp.c~input-convert-kcalloc-to-kzalloc drivers/input/gameport/emu10k1-gp.c --- devel/drivers/input/gameport/emu10k1-gp.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/gameport/emu10k1-gp.c 2005-08-06 14:35:12.000000000 -0700 @@ -75,7 +75,7 @@ static int __devinit emu_probe(struct pc if (!request_region(ioport, iolen, "emu10k1-gp")) return -EBUSY; - emu = kcalloc(1, sizeof(struct emu), GFP_KERNEL); + emu = kzalloc(sizeof(struct emu), GFP_KERNEL); port = gameport_allocate_port(); if (!emu || !port) { printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n"); diff -puN drivers/input/gameport/fm801-gp.c~input-convert-kcalloc-to-kzalloc drivers/input/gameport/fm801-gp.c --- devel/drivers/input/gameport/fm801-gp.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/gameport/fm801-gp.c 2005-08-06 14:35:12.000000000 -0700 @@ -83,7 +83,7 @@ static int __devinit fm801_gp_probe(stru struct fm801_gp *gp; struct gameport *port; - gp = kcalloc(1, sizeof(struct fm801_gp), GFP_KERNEL); + gp = kzalloc(sizeof(struct fm801_gp), GFP_KERNEL); port = gameport_allocate_port(); if (!gp || !port) { printk(KERN_ERR "fm801-gp: Memory allocation failed\n"); diff -puN drivers/input/gameport/ns558.c~input-convert-kcalloc-to-kzalloc drivers/input/gameport/ns558.c --- devel/drivers/input/gameport/ns558.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/gameport/ns558.c 2005-08-06 14:35:12.000000000 -0700 @@ -142,7 +142,7 @@ static int ns558_isa_probe(int io) return -EBUSY; } - ns558 = kcalloc(1, sizeof(struct ns558), GFP_KERNEL); + ns558 = kzalloc(sizeof(struct ns558), GFP_KERNEL); port = gameport_allocate_port(); if (!ns558 || !port) { printk(KERN_ERR "ns558: Memory allocation failed.\n"); @@ -215,7 +215,7 @@ static int ns558_pnp_probe(struct pnp_de if (!request_region(ioport, iolen, "ns558-pnp")) return -EBUSY; - ns558 = kcalloc(1, sizeof(struct ns558), GFP_KERNEL); + ns558 = kzalloc(sizeof(struct ns558), GFP_KERNEL); port = gameport_allocate_port(); if (!ns558 || !port) { printk(KERN_ERR "ns558: Memory allocation failed\n"); diff -puN drivers/input/joystick/a3d.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/a3d.c --- devel/drivers/input/joystick/a3d.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/a3d.c 2005-08-06 14:35:12.000000000 -0700 @@ -269,7 +269,7 @@ static int a3d_connect(struct gameport * int i; int err; - if (!(a3d = kcalloc(1, sizeof(struct a3d), GFP_KERNEL))) + if (!(a3d = kzalloc(sizeof(struct a3d), GFP_KERNEL))) return -ENOMEM; a3d->gameport = gameport; diff -puN drivers/input/joystick/adi.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/adi.c --- devel/drivers/input/joystick/adi.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/adi.c 2005-08-06 14:35:12.000000000 -0700 @@ -469,7 +469,7 @@ static int adi_connect(struct gameport * int i; int err; - if (!(port = kcalloc(1, sizeof(struct adi_port), GFP_KERNEL))) + if (!(port = kzalloc(sizeof(struct adi_port), GFP_KERNEL))) return -ENOMEM; port->gameport = gameport; diff -puN drivers/input/joystick/analog.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/analog.c --- devel/drivers/input/joystick/analog.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/analog.c 2005-08-06 14:35:12.000000000 -0700 @@ -655,7 +655,7 @@ static int analog_connect(struct gamepor int i; int err; - if (!(port = kcalloc(1, sizeof(struct analog_port), GFP_KERNEL))) + if (!(port = kzalloc(sizeof(struct analog_port), GFP_KERNEL))) return - ENOMEM; err = analog_init_port(gameport, drv, port); diff -puN drivers/input/joystick/cobra.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/cobra.c --- devel/drivers/input/joystick/cobra.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/cobra.c 2005-08-06 14:35:12.000000000 -0700 @@ -163,7 +163,7 @@ static int cobra_connect(struct gameport int i, j; int err; - if (!(cobra = kcalloc(1, sizeof(struct cobra), GFP_KERNEL))) + if (!(cobra = kzalloc(sizeof(struct cobra), GFP_KERNEL))) return -ENOMEM; cobra->gameport = gameport; diff -puN drivers/input/joystick/db9.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/db9.c --- devel/drivers/input/joystick/db9.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/db9.c 2005-08-06 14:35:12.000000000 -0700 @@ -572,7 +572,7 @@ static struct db9 __init *db9_probe(int } } - if (!(db9 = kcalloc(1, sizeof(struct db9), GFP_KERNEL))) { + if (!(db9 = kzalloc(sizeof(struct db9), GFP_KERNEL))) { parport_put_port(pp); return NULL; } diff -puN drivers/input/joystick/gamecon.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/gamecon.c --- devel/drivers/input/joystick/gamecon.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/gamecon.c 2005-08-06 14:35:12.000000000 -0700 @@ -554,7 +554,7 @@ static struct gc __init *gc_probe(int *c return NULL; } - if (!(gc = kcalloc(1, sizeof(struct gc), GFP_KERNEL))) { + if (!(gc = kzalloc(sizeof(struct gc), GFP_KERNEL))) { parport_put_port(pp); return NULL; } diff -puN drivers/input/joystick/gf2k.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/gf2k.c --- devel/drivers/input/joystick/gf2k.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/gf2k.c 2005-08-06 14:35:12.000000000 -0700 @@ -242,7 +242,7 @@ static int gf2k_connect(struct gameport unsigned char data[GF2K_LENGTH]; int i, err; - if (!(gf2k = kcalloc(1, sizeof(struct gf2k), GFP_KERNEL))) + if (!(gf2k = kzalloc(sizeof(struct gf2k), GFP_KERNEL))) return -ENOMEM; gf2k->gameport = gameport; diff -puN drivers/input/joystick/grip.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/grip.c --- devel/drivers/input/joystick/grip.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/grip.c 2005-08-06 14:35:12.000000000 -0700 @@ -301,7 +301,7 @@ static int grip_connect(struct gameport int i, j, t; int err; - if (!(grip = kcalloc(1, sizeof(struct grip), GFP_KERNEL))) + if (!(grip = kzalloc(sizeof(struct grip), GFP_KERNEL))) return -ENOMEM; grip->gameport = gameport; diff -puN drivers/input/joystick/grip_mp.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/grip_mp.c --- devel/drivers/input/joystick/grip_mp.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/grip_mp.c 2005-08-06 14:35:12.000000000 -0700 @@ -607,7 +607,7 @@ static int grip_connect(struct gameport struct grip_mp *grip; int err; - if (!(grip = kcalloc(1, sizeof(struct grip_mp), GFP_KERNEL))) + if (!(grip = kzalloc(sizeof(struct grip_mp), GFP_KERNEL))) return -ENOMEM; grip->gameport = gameport; diff -puN drivers/input/joystick/guillemot.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/guillemot.c --- devel/drivers/input/joystick/guillemot.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/guillemot.c 2005-08-06 14:35:12.000000000 -0700 @@ -183,7 +183,7 @@ static int guillemot_connect(struct game int i, t; int err; - if (!(guillemot = kcalloc(1, sizeof(struct guillemot), GFP_KERNEL))) + if (!(guillemot = kzalloc(sizeof(struct guillemot), GFP_KERNEL))) return -ENOMEM; guillemot->gameport = gameport; diff -puN drivers/input/joystick/interact.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/interact.c --- devel/drivers/input/joystick/interact.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/interact.c 2005-08-06 14:35:12.000000000 -0700 @@ -212,7 +212,7 @@ static int interact_connect(struct gamep int i, t; int err; - if (!(interact = kcalloc(1, sizeof(struct interact), GFP_KERNEL))) + if (!(interact = kzalloc(sizeof(struct interact), GFP_KERNEL))) return -ENOMEM; interact->gameport = gameport; diff -puN drivers/input/joystick/sidewinder.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/sidewinder.c --- devel/drivers/input/joystick/sidewinder.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/sidewinder.c 2005-08-06 14:35:12.000000000 -0700 @@ -590,7 +590,7 @@ static int sw_connect(struct gameport *g comment[0] = 0; - sw = kcalloc(1, sizeof(struct sw), GFP_KERNEL); + sw = kzalloc(sizeof(struct sw), GFP_KERNEL); buf = kmalloc(SW_LENGTH, GFP_KERNEL); idbuf = kmalloc(SW_LENGTH, GFP_KERNEL); if (!sw || !buf || !idbuf) { diff -puN drivers/input/joystick/tmdc.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/tmdc.c --- devel/drivers/input/joystick/tmdc.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/tmdc.c 2005-08-06 14:35:12.000000000 -0700 @@ -262,7 +262,7 @@ static int tmdc_connect(struct gameport int i, j, k, l, m; int err; - if (!(tmdc = kcalloc(1, sizeof(struct tmdc), GFP_KERNEL))) + if (!(tmdc = kzalloc(sizeof(struct tmdc), GFP_KERNEL))) return -ENOMEM; tmdc->gameport = gameport; diff -puN drivers/input/joystick/turbografx.c~input-convert-kcalloc-to-kzalloc drivers/input/joystick/turbografx.c --- devel/drivers/input/joystick/turbografx.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/joystick/turbografx.c 2005-08-06 14:35:12.000000000 -0700 @@ -178,7 +178,7 @@ static struct tgfx __init *tgfx_probe(in return NULL; } - if (!(tgfx = kcalloc(1, sizeof(struct tgfx), GFP_KERNEL))) { + if (!(tgfx = kzalloc(sizeof(struct tgfx), GFP_KERNEL))) { parport_put_port(pp); return NULL; } diff -puN drivers/input/keyboard/corgikbd.c~input-convert-kcalloc-to-kzalloc drivers/input/keyboard/corgikbd.c --- devel/drivers/input/keyboard/corgikbd.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/keyboard/corgikbd.c 2005-08-06 14:35:12.000000000 -0700 @@ -260,7 +260,7 @@ static int __init corgikbd_probe(struct int i; struct corgikbd *corgikbd; - corgikbd = kcalloc(1, sizeof(struct corgikbd), GFP_KERNEL); + corgikbd = kzalloc(sizeof(struct corgikbd), GFP_KERNEL); if (!corgikbd) return -ENOMEM; diff -puN drivers/input/mouse/psmouse-base.c~input-convert-kcalloc-to-kzalloc drivers/input/mouse/psmouse-base.c --- devel/drivers/input/mouse/psmouse-base.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/mouse/psmouse-base.c 2005-08-06 14:35:12.000000000 -0700 @@ -883,7 +883,7 @@ static int psmouse_connect(struct serio psmouse_deactivate(parent); } - if (!(psmouse = kcalloc(1, sizeof(struct psmouse), GFP_KERNEL))) { + if (!(psmouse = kzalloc(sizeof(struct psmouse), GFP_KERNEL))) { retval = -ENOMEM; goto out; } diff -puN drivers/input/serio/serport.c~input-convert-kcalloc-to-kzalloc drivers/input/serio/serport.c --- devel/drivers/input/serio/serport.c~input-convert-kcalloc-to-kzalloc 2005-08-06 14:35:12.000000000 -0700 +++ devel-akpm/drivers/input/serio/serport.c 2005-08-06 14:35:12.000000000 -0700 @@ -87,7 +87,7 @@ static int serport_ldisc_open(struct tty if (!capable(CAP_SYS_ADMIN)) return -EPERM; - serport = kcalloc(1, sizeof(struct serport), GFP_KERNEL); + serport = kzalloc(sizeof(struct serport), GFP_KERNEL); if (!serport) return -ENOMEM; @@ -165,7 +165,7 @@ static ssize_t serport_ldisc_read(struct if (test_and_set_bit(SERPORT_BUSY, &serport->flags)) return -EBUSY; - serport->serio = serio = kcalloc(1, sizeof(struct serio), GFP_KERNEL); + serport->serio = serio = kzalloc(sizeof(struct serio), GFP_KERNEL); if (!serio) return -ENOMEM; _