]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pnp/pnpbios/rsparser.c
Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / drivers / pnp / pnpbios / rsparser.c
index c89c98a2cca8004dd826130a4bbf5e93efa724f3..3c2ab8394e3f987b71a555461e98c3c0b1a58e3e 100644 (file)
@@ -3,7 +3,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/ctype.h>
 #include <linux/pnp.h>
 #include <linux/pnpbios.h>
@@ -249,7 +248,7 @@ static void
 pnpbios_parse_mem_option(unsigned char *p, int size, struct pnp_option *option)
 {
        struct pnp_mem * mem;
-       mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
+       mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
        if (!mem)
                return;
        mem->min = ((p[5] << 8) | p[4]) << 8;
@@ -265,7 +264,7 @@ static void
 pnpbios_parse_mem32_option(unsigned char *p, int size, struct pnp_option *option)
 {
        struct pnp_mem * mem;
-       mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
+       mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
        if (!mem)
                return;
        mem->min = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4];
@@ -281,7 +280,7 @@ static void
 pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, struct pnp_option *option)
 {
        struct pnp_mem * mem;
-       mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
+       mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
        if (!mem)
                return;
        mem->min = mem->max = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4];
@@ -298,7 +297,7 @@ pnpbios_parse_irq_option(unsigned char *p, int size, struct pnp_option *option)
        struct pnp_irq * irq;
        unsigned long bits;
 
-       irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL);
+       irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
        if (!irq)
                return;
        bits = (p[2] << 8) | p[1];
@@ -315,7 +314,7 @@ static void
 pnpbios_parse_dma_option(unsigned char *p, int size, struct pnp_option *option)
 {
        struct pnp_dma * dma;
-       dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL);
+       dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
        if (!dma)
                return;
        dma->map = p[1];
@@ -328,7 +327,7 @@ static void
 pnpbios_parse_port_option(unsigned char *p, int size, struct pnp_option *option)
 {
        struct pnp_port * port;
-       port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL);
+       port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
        if (!port)
                return;
        port->min = (p[3] << 8) | p[2];
@@ -344,7 +343,7 @@ static void
 pnpbios_parse_fixed_port_option(unsigned char *p, int size, struct pnp_option *option)
 {
        struct pnp_port * port;
-       port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL);
+       port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
        if (!port)
                return;
        port->min = port->max = (p[2] << 8) | p[1];
@@ -528,10 +527,9 @@ pnpbios_parse_compatible_ids(unsigned char *p, unsigned char *end, struct pnp_de
                case SMALL_TAG_COMPATDEVID: /* compatible ID */
                        if (len != 4)
                                goto len_err;
-                       dev_id =  kcalloc(1, sizeof (struct pnp_id), GFP_KERNEL);
+                       dev_id =  kzalloc(sizeof (struct pnp_id), GFP_KERNEL);
                        if (!dev_id)
                                return NULL;
-                       memset(dev_id, 0, sizeof(struct pnp_id));
                        pnpid32_to_pnpid(p[1] | p[2] << 8 | p[3] << 16 | p[4] << 24,id);
                        memcpy(&dev_id->id, id, 7);
                        pnp_add_id(dev_id, dev);