aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fhci-hcd.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/usb/host/fhci-hcd.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/usb/host/fhci-hcd.c')
-rw-r--r--drivers/usb/host/fhci-hcd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index 0951818ef93b..15379c636143 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -27,6 +27,7 @@
27#include <linux/usb.h> 27#include <linux/usb.h>
28#include <linux/of_platform.h> 28#include <linux/of_platform.h>
29#include <linux/of_gpio.h> 29#include <linux/of_gpio.h>
30#include <linux/slab.h>
30#include <asm/qe.h> 31#include <asm/qe.h>
31#include <asm/fsl_gtm.h> 32#include <asm/fsl_gtm.h>
32#include "../core/hcd.h" 33#include "../core/hcd.h"
@@ -242,9 +243,10 @@ err:
242static void fhci_usb_free(void *lld) 243static void fhci_usb_free(void *lld)
243{ 244{
244 struct fhci_usb *usb = lld; 245 struct fhci_usb *usb = lld;
245 struct fhci_hcd *fhci = usb->fhci; 246 struct fhci_hcd *fhci;
246 247
247 if (usb) { 248 if (usb) {
249 fhci = usb->fhci;
248 fhci_config_transceiver(fhci, FHCI_PORT_POWER_OFF); 250 fhci_config_transceiver(fhci, FHCI_PORT_POWER_OFF);
249 fhci_ep0_free(usb); 251 fhci_ep0_free(usb);
250 kfree(usb->actual_frame); 252 kfree(usb->actual_frame);
@@ -432,7 +434,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
432 return -ENOMEM; 434 return -ENOMEM;
433 435
434 /* allocate the private part of the URB */ 436 /* allocate the private part of the URB */
435 urb_priv->tds = kzalloc(size * sizeof(struct td), mem_flags); 437 urb_priv->tds = kcalloc(size, sizeof(*urb_priv->tds), mem_flags);
436 if (!urb_priv->tds) { 438 if (!urb_priv->tds) {
437 kfree(urb_priv); 439 kfree(urb_priv);
438 return -ENOMEM; 440 return -ENOMEM;
@@ -804,7 +806,7 @@ static int __devexit of_fhci_remove(struct of_device *ofdev)
804 return fhci_remove(&ofdev->dev); 806 return fhci_remove(&ofdev->dev);
805} 807}
806 808
807static struct of_device_id of_fhci_match[] = { 809static const struct of_device_id of_fhci_match[] = {
808 { .compatible = "fsl,mpc8323-qe-usb", }, 810 { .compatible = "fsl,mpc8323-qe-usb", },
809 {}, 811 {},
810}; 812};