diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-02-27 15:29:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:59 -0500 |
commit | 80b6ca48321974a6566a1c9048ba34f60420bca6 (patch) | |
tree | a350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/host/hc_crisv10.c | |
parent | d54a5cb6484705f7808b337917cc7598f2f971c3 (diff) |
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/hc_crisv10.c')
-rw-r--r-- | drivers/usb/host/hc_crisv10.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c index 641268d7e6f..2fe7fd19437 100644 --- a/drivers/usb/host/hc_crisv10.c +++ b/drivers/usb/host/hc_crisv10.c | |||
@@ -2137,10 +2137,9 @@ static int etrax_usb_submit_bulk_urb(struct urb *urb) | |||
2137 | urb->status = -EINPROGRESS; | 2137 | urb->status = -EINPROGRESS; |
2138 | 2138 | ||
2139 | /* Setup the hcpriv data. */ | 2139 | /* Setup the hcpriv data. */ |
2140 | urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); | 2140 | urb_priv = kzalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); |
2141 | assert(urb_priv != NULL); | 2141 | assert(urb_priv != NULL); |
2142 | /* This sets rx_offset to 0. */ | 2142 | /* This sets rx_offset to 0. */ |
2143 | memset(urb_priv, 0, sizeof(etrax_urb_priv_t)); | ||
2144 | urb_priv->urb_state = NOT_STARTED; | 2143 | urb_priv->urb_state = NOT_STARTED; |
2145 | urb->hcpriv = urb_priv; | 2144 | urb->hcpriv = urb_priv; |
2146 | 2145 | ||
@@ -2475,10 +2474,9 @@ static int etrax_usb_submit_ctrl_urb(struct urb *urb) | |||
2475 | urb->status = -EINPROGRESS; | 2474 | urb->status = -EINPROGRESS; |
2476 | 2475 | ||
2477 | /* Setup the hcpriv data. */ | 2476 | /* Setup the hcpriv data. */ |
2478 | urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); | 2477 | urb_priv = kzalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); |
2479 | assert(urb_priv != NULL); | 2478 | assert(urb_priv != NULL); |
2480 | /* This sets rx_offset to 0. */ | 2479 | /* This sets rx_offset to 0. */ |
2481 | memset(urb_priv, 0, sizeof(etrax_urb_priv_t)); | ||
2482 | urb_priv->urb_state = NOT_STARTED; | 2480 | urb_priv->urb_state = NOT_STARTED; |
2483 | urb->hcpriv = urb_priv; | 2481 | urb->hcpriv = urb_priv; |
2484 | 2482 | ||
@@ -2767,9 +2765,8 @@ static void etrax_usb_add_to_intr_sb_list(struct urb *urb, int epid) | |||
2767 | maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)); | 2765 | maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)); |
2768 | interval = urb->interval; | 2766 | interval = urb->interval; |
2769 | 2767 | ||
2770 | urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); | 2768 | urb_priv = kzalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); |
2771 | assert(urb_priv != NULL); | 2769 | assert(urb_priv != NULL); |
2772 | memset(urb_priv, 0, sizeof(etrax_urb_priv_t)); | ||
2773 | urb->hcpriv = urb_priv; | 2770 | urb->hcpriv = urb_priv; |
2774 | 2771 | ||
2775 | first_ep = &TxIntrEPList[0]; | 2772 | first_ep = &TxIntrEPList[0]; |
@@ -2997,9 +2994,8 @@ static void etrax_usb_add_to_isoc_sb_list(struct urb *urb, int epid) | |||
2997 | 2994 | ||
2998 | prev_sb_desc = next_sb_desc = temp_sb_desc = NULL; | 2995 | prev_sb_desc = next_sb_desc = temp_sb_desc = NULL; |
2999 | 2996 | ||
3000 | urb_priv = kmalloc(sizeof(etrax_urb_priv_t), GFP_ATOMIC); | 2997 | urb_priv = kzalloc(sizeof(etrax_urb_priv_t), GFP_ATOMIC); |
3001 | assert(urb_priv != NULL); | 2998 | assert(urb_priv != NULL); |
3002 | memset(urb_priv, 0, sizeof(etrax_urb_priv_t)); | ||
3003 | 2999 | ||
3004 | urb->hcpriv = urb_priv; | 3000 | urb->hcpriv = urb_priv; |
3005 | urb_priv->epid = epid; | 3001 | urb_priv->epid = epid; |