Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[profile/ivi/kernel-adaptation-intel-automotive.git] / drivers / usb / host / fhci-hcd.c
index 78e7c3c..15379c6 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/usb.h>
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
+#include <linux/slab.h>
 #include <asm/qe.h>
 #include <asm/fsl_gtm.h>
 #include "../core/hcd.h"
@@ -433,7 +434,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
                return -ENOMEM;
 
        /* allocate the private part of the URB */
-       urb_priv->tds = kzalloc(size * sizeof(struct td), mem_flags);
+       urb_priv->tds = kcalloc(size, sizeof(*urb_priv->tds), mem_flags);
        if (!urb_priv->tds) {
                kfree(urb_priv);
                return -ENOMEM;
@@ -805,7 +806,7 @@ static int __devexit of_fhci_remove(struct of_device *ofdev)
        return fhci_remove(&ofdev->dev);
 }
 
-static struct of_device_id of_fhci_match[] = {
+static const struct of_device_id of_fhci_match[] = {
        { .compatible = "fsl,mpc8323-qe-usb", },
        {},
 };