Skip to content

Commit a97e148

Browse files
Pekka EnbergLinus Torvalds
authored andcommitted
[PATCH] input: convert kcalloc to kzalloc
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 874ca6c commit a97e148

20 files changed

Lines changed: 22 additions & 22 deletions

File tree

‎drivers/input/gameport/emu10k1-gp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
7575
if (!request_region(ioport, iolen, "emu10k1-gp"))
7676
return -EBUSY;
7777

78-
emu = kcalloc(1, sizeof(struct emu), GFP_KERNEL);
78+
emu = kzalloc(sizeof(struct emu), GFP_KERNEL);
7979
port = gameport_allocate_port();
8080
if (!emu || !port) {
8181
printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n");

‎drivers/input/gameport/fm801-gp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
8383
struct fm801_gp *gp;
8484
struct gameport *port;
8585

86-
gp = kcalloc(1, sizeof(struct fm801_gp), GFP_KERNEL);
86+
gp = kzalloc(sizeof(struct fm801_gp), GFP_KERNEL);
8787
port = gameport_allocate_port();
8888
if (!gp || !port) {
8989
printk(KERN_ERR "fm801-gp: Memory allocation failed\n");

‎drivers/input/gameport/ns558.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int ns558_isa_probe(int io)
142142
return -EBUSY;
143143
}
144144

145-
ns558 = kcalloc(1, sizeof(struct ns558), GFP_KERNEL);
145+
ns558 = kzalloc(sizeof(struct ns558), GFP_KERNEL);
146146
port = gameport_allocate_port();
147147
if (!ns558 || !port) {
148148
printk(KERN_ERR "ns558: Memory allocation failed.\n");
@@ -215,7 +215,7 @@ static int ns558_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
215215
if (!request_region(ioport, iolen, "ns558-pnp"))
216216
return -EBUSY;
217217

218-
ns558 = kcalloc(1, sizeof(struct ns558), GFP_KERNEL);
218+
ns558 = kzalloc(sizeof(struct ns558), GFP_KERNEL);
219219
port = gameport_allocate_port();
220220
if (!ns558 || !port) {
221221
printk(KERN_ERR "ns558: Memory allocation failed\n");

‎drivers/input/joystick/a3d.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
269269
int i;
270270
int err;
271271

272-
if (!(a3d = kcalloc(1, sizeof(struct a3d), GFP_KERNEL)))
272+
if (!(a3d = kzalloc(sizeof(struct a3d), GFP_KERNEL)))
273273
return -ENOMEM;
274274

275275
a3d->gameport = gameport;

‎drivers/input/joystick/adi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ static int adi_connect(struct gameport *gameport, struct gameport_driver *drv)
469469
int i;
470470
int err;
471471

472-
if (!(port = kcalloc(1, sizeof(struct adi_port), GFP_KERNEL)))
472+
if (!(port = kzalloc(sizeof(struct adi_port), GFP_KERNEL)))
473473
return -ENOMEM;
474474

475475
port->gameport = gameport;

‎drivers/input/joystick/analog.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ static int analog_connect(struct gameport *gameport, struct gameport_driver *drv
655655
int i;
656656
int err;
657657

658-
if (!(port = kcalloc(1, sizeof(struct analog_port), GFP_KERNEL)))
658+
if (!(port = kzalloc(sizeof(struct analog_port), GFP_KERNEL)))
659659
return - ENOMEM;
660660

661661
err = analog_init_port(gameport, drv, port);

‎drivers/input/joystick/cobra.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv)
163163
int i, j;
164164
int err;
165165

166-
if (!(cobra = kcalloc(1, sizeof(struct cobra), GFP_KERNEL)))
166+
if (!(cobra = kzalloc(sizeof(struct cobra), GFP_KERNEL)))
167167
return -ENOMEM;
168168

169169
cobra->gameport = gameport;

‎drivers/input/joystick/db9.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ static struct db9 __init *db9_probe(int *config, int nargs)
572572
}
573573
}
574574

575-
if (!(db9 = kcalloc(1, sizeof(struct db9), GFP_KERNEL))) {
575+
if (!(db9 = kzalloc(sizeof(struct db9), GFP_KERNEL))) {
576576
parport_put_port(pp);
577577
return NULL;
578578
}

‎drivers/input/joystick/gamecon.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ static struct gc __init *gc_probe(int *config, int nargs)
554554
return NULL;
555555
}
556556

557-
if (!(gc = kcalloc(1, sizeof(struct gc), GFP_KERNEL))) {
557+
if (!(gc = kzalloc(sizeof(struct gc), GFP_KERNEL))) {
558558
parport_put_port(pp);
559559
return NULL;
560560
}

‎drivers/input/joystick/gf2k.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
242242
unsigned char data[GF2K_LENGTH];
243243
int i, err;
244244

245-
if (!(gf2k = kcalloc(1, sizeof(struct gf2k), GFP_KERNEL)))
245+
if (!(gf2k = kzalloc(sizeof(struct gf2k), GFP_KERNEL)))
246246
return -ENOMEM;
247247

248248
gf2k->gameport = gameport;

0 commit comments

Comments
 (0)