diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-12-11 21:18:26 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-06 00:28:06 +0100 |
commit | 8084b372adac9c24ff7abdd939b2e8816e7b88a3 (patch) | |
tree | a4a4005d7b025abc0a3e7693404abd0abbfd434b /drivers/pcmcia/rsrc_nonstatic.c | |
parent | 6423efaacbf0bce6372897e793d8450c1c08ec8d (diff) |
[PATCH] pcmcia: kzalloc conversion
Convert users of kmalloc and memset to kzalloc
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 6b18092205b1..5301ac60358f 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -75,10 +75,9 @@ static DECLARE_MUTEX(rsrc_sem); static struct resource * make_resource(unsigned long b, unsigned long n, int flags, char *name) { - struct resource *res = kmalloc(sizeof(*res), GFP_KERNEL); + struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); if (res) { - memset(res, 0, sizeof(*res)); res->name = name; res->start = b; res->end = b + n - 1; @@ -200,12 +199,11 @@ static void do_io_probe(struct pcmcia_socket *s, kio_addr_t base, kio_addr_t num base, base+num-1); /* First, what does a floating port look like? */ - b = kmalloc(256, GFP_KERNEL); + b = kzalloc(256, GFP_KERNEL); if (!b) { printk(KERN_ERR "do_io_probe: unable to kmalloc 256 bytes"); return; } - memset(b, 0, 256); for (i = base, most = 0; i < base+num; i += 8) { res = claim_region(NULL, i, 8, IORESOURCE_IO, "PCMCIA IO probe"); if (!res) @@ -850,10 +848,9 @@ static int nonstatic_init(struct pcmcia_socket *s) { struct socket_data *data; - data = kmalloc(sizeof(struct socket_data), GFP_KERNEL); + data = kzalloc(sizeof(struct socket_data), GFP_KERNEL); if (!data) return -ENOMEM; - memset(data, 0, sizeof(struct socket_data)); data->mem_db.next = &data->mem_db; data->io_db.next = &data->io_db; |