]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] input: convert kcalloc to kzalloc
authorPekka Enberg <penberg@cs.helsinki.fi>
Tue, 6 Sep 2005 22:18:33 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:45 +0000 (16:57 -0700)
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>
20 files changed:
drivers/input/gameport/emu10k1-gp.c
drivers/input/gameport/fm801-gp.c
drivers/input/gameport/ns558.c
drivers/input/joystick/a3d.c
drivers/input/joystick/adi.c
drivers/input/joystick/analog.c
drivers/input/joystick/cobra.c
drivers/input/joystick/db9.c
drivers/input/joystick/gamecon.c
drivers/input/joystick/gf2k.c
drivers/input/joystick/grip.c
drivers/input/joystick/grip_mp.c
drivers/input/joystick/guillemot.c
drivers/input/joystick/interact.c
drivers/input/joystick/sidewinder.c
drivers/input/joystick/tmdc.c
drivers/input/joystick/turbografx.c
drivers/input/keyboard/corgikbd.c
drivers/input/mouse/psmouse-base.c
drivers/input/serio/serport.c

index a0118038330a9702f0fd7a03e8269920575f8d18..462f8d300aae5629719c58a983627fed065879a5 100644 (file)
@@ -75,7 +75,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
        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");
index 57615bc639061384d7243230620cd542952213f1..47e93daa0fa7c498aec5ae237135126d0ef2e040 100644 (file)
@@ -83,7 +83,7 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
        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");
index 70f051894a3cfa4d50f5dda7268c6af26e63b96f..d2e55dc956bafd3477ebd4e7ea448263b6375fcd 100644 (file)
@@ -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_dev *dev, const struct pnp_device_id *did)
        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");
index bf34f75b9467f6650c5447a020f562787bccacfb..bf65430181faf0f2ee5db443f950bd35c90963f8 100644 (file)
@@ -269,7 +269,7 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index 265962956c63cbf9d924f8bd8518981d10cf2ea5..cf35ae638a0d2c129544d16d90c87c22027e2b4e 100644 (file)
@@ -469,7 +469,7 @@ static int adi_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index c3a5739030c3ba45d8dd1dda01cd79382faf3478..64b1313a3c66d0c6400dcbd8e35c9f60c0041bd9 100644 (file)
@@ -655,7 +655,7 @@ static int analog_connect(struct gameport *gameport, struct gameport_driver *drv
        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);
index a6002205328f80d16bf882054f5bfc32f9b806ac..0b2e9fa2657969457dfc2db4c12b39c5984f8966 100644 (file)
@@ -163,7 +163,7 @@ static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index fbd3eed07f90403806e1bce3212781a638e35241..2a3e4bb2da507ef78f9cc33cf88b88e19d262fac 100644 (file)
@@ -572,7 +572,7 @@ static struct db9 __init *db9_probe(int *config, int nargs)
                }
        }
 
-       if (!(db9 = kcalloc(1, sizeof(struct db9), GFP_KERNEL))) {
+       if (!(db9 = kzalloc(sizeof(struct db9), GFP_KERNEL))) {
                parport_put_port(pp);
                return NULL;
        }
index 95bbdd302aad8639bacc4817e6f49b472e749211..5427bf9fc862320261a2c45aebbe53beeb761d00 100644 (file)
@@ -554,7 +554,7 @@ static struct gc __init *gc_probe(int *config, int nargs)
                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;
        }
index 7d969420066c75c0140eed3ba2d88bc9cf7fedf5..8e4f92b115e6aa8188c70745011e40c71e00ab48 100644 (file)
@@ -242,7 +242,7 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index d1500d2562d67ec99fcaa72de01dac377cf14d23..9d3f910dd568b4cb46f7daf8ee0a6027b7ab5f8a 100644 (file)
@@ -301,7 +301,7 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index 0da7bd133ccf39f03e948d60e2bfa19e18b742ea..da17eee6f5741f45cea1d86eca0be7c5045307a9 100644 (file)
@@ -607,7 +607,7 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index f93da7bc082d08622b0859222a87b7e981407304..6a70ec429f063eb28d6f6f251037b695cb794841 100644 (file)
@@ -183,7 +183,7 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver *
        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;
index 9d3f8c38cb097391403f44846781a75d4c68d845..d7b3472bd686611a5e30276203ea42778b1ea199 100644 (file)
@@ -212,7 +212,7 @@ static int interact_connect(struct gameport *gameport, struct gameport_driver *d
        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;
index 47144a7ed9e750f4682eac415c9d6bf7c8ac1b49..9e0353721a35d8892e96d5a5779075bafb1b92e5 100644 (file)
@@ -590,7 +590,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
 
        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) {
index 9eb9954cac6e2584e70ef4c9a9d6646c494e348d..7431efc4330edb090696ea66b78e06e5c4d30378 100644 (file)
@@ -262,7 +262,7 @@ static int tmdc_connect(struct gameport *gameport, struct gameport_driver *drv)
        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;
index 28100d461cb751c1c1d8b34f4fb5001b970e1b2c..0c5b9c8297cd4ff1afb1c1fe979f962d944a6dca 100644 (file)
@@ -178,7 +178,7 @@ static struct tgfx __init *tgfx_probe(int *config, int nargs)
                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;
        }
index a8551711e8d60031ffaadbb1e7e632a32f162aed..7719bdfa9eea9bbc5a285b2bf731c4b949e9a6d5 100644 (file)
@@ -260,7 +260,7 @@ static int __init corgikbd_probe(struct device *dev)
        int i;
        struct corgikbd *corgikbd;
 
-       corgikbd = kcalloc(1, sizeof(struct corgikbd), GFP_KERNEL);
+       corgikbd = kzalloc(sizeof(struct corgikbd), GFP_KERNEL);
        if (!corgikbd)
                return -ENOMEM;
 
index 2bb2fe78bdca988f34ccae1cdebf0ba0faff79c5..12bdd3eff923ea32042d76f47110d217c43243f7 100644 (file)
@@ -883,7 +883,7 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
                psmouse_deactivate(parent);
        }
 
-       if (!(psmouse = kcalloc(1, sizeof(struct psmouse), GFP_KERNEL))) {
+       if (!(psmouse = kzalloc(sizeof(struct psmouse), GFP_KERNEL))) {
                retval = -ENOMEM;
                goto out;
        }
index 79ca38469159b90abd6d1f52bffb162dbb89968c..1bd88fca05425a9d6ddfb9f52c36d296f832fad2 100644 (file)
@@ -87,7 +87,7 @@ static int serport_ldisc_open(struct tty_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 tty_struct * tty, struct file * file, u
        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;