Commit c907a5bb authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Paul Mackerras

mem_flags added to usb_submit_urb().

This fixes usb drivers outside of the drivers/usb directory.
parent 1ce27f88
...@@ -547,17 +547,17 @@ static void * hci_usb_probe(struct usb_device *udev, unsigned int ifnum, const s ...@@ -547,17 +547,17 @@ static void * hci_usb_probe(struct usb_device *udev, unsigned int ifnum, const s
husb->udev = udev; husb->udev = udev;
husb->bulk_out_ep_addr = bulk_out_ep->bEndpointAddress; husb->bulk_out_ep_addr = bulk_out_ep->bEndpointAddress;
if (!(husb->ctrl_urb = usb_alloc_urb(0))) { if (!(husb->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL))) {
ERR("Can't allocate: control URB"); ERR("Can't allocate: control URB");
goto probe_error; goto probe_error;
} }
if (!(husb->write_urb = usb_alloc_urb(0))) { if (!(husb->write_urb = usb_alloc_urb(0, GFP_KERNEL))) {
ERR("Can't allocate: write URB"); ERR("Can't allocate: write URB");
goto probe_error; goto probe_error;
} }
if (!(husb->read_urb = usb_alloc_urb(0))) { if (!(husb->read_urb = usb_alloc_urb(0, GFP_KERNEL))) {
ERR("Can't allocate: read URB"); ERR("Can't allocate: read URB");
goto probe_error; goto probe_error;
} }
...@@ -578,7 +578,7 @@ static void * hci_usb_probe(struct usb_device *udev, unsigned int ifnum, const s ...@@ -578,7 +578,7 @@ static void * hci_usb_probe(struct usb_device *udev, unsigned int ifnum, const s
pipe = usb_rcvintpipe(udev, ep->bEndpointAddress); pipe = usb_rcvintpipe(udev, ep->bEndpointAddress);
size = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); size = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
if (!(husb->intr_urb = usb_alloc_urb(0))) { if (!(husb->intr_urb = usb_alloc_urb(0, GFP_KERNEL))) {
ERR("Can't allocate: interrupt URB"); ERR("Can't allocate: interrupt URB");
goto probe_error; goto probe_error;
} }
......
...@@ -1024,18 +1024,18 @@ static void *iforce_usb_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -1024,18 +1024,18 @@ static void *iforce_usb_probe(struct usb_device *dev, unsigned int ifnum,
if (!(iforce = kmalloc(sizeof(struct iforce) + 32, GFP_KERNEL))) return NULL; if (!(iforce = kmalloc(sizeof(struct iforce) + 32, GFP_KERNEL))) return NULL;
memset(iforce, 0, sizeof(struct iforce)); memset(iforce, 0, sizeof(struct iforce));
iforce->irq = usb_alloc_urb(0); iforce->irq = usb_alloc_urb(0, GFP_KERNEL);
if (!iforce->irq) { if (!iforce->irq) {
kfree(iforce); kfree(iforce);
return NULL; return NULL;
} }
iforce->out = usb_alloc_urb(0); iforce->out = usb_alloc_urb(0, GFP_KERNEL);
if (!iforce->out) { if (!iforce->out) {
usb_free_urb(iforce->irq); usb_free_urb(iforce->irq);
kfree(iforce); kfree(iforce);
return NULL; return NULL;
} }
iforce->ctrl = usb_alloc_urb(0); iforce->ctrl = usb_alloc_urb(0, GFP_KERNEL);
if (!iforce->ctrl) { if (!iforce->ctrl) {
usb_free_urb(iforce->out); usb_free_urb(iforce->out);
usb_free_urb(iforce->irq); usb_free_urb(iforce->irq);
......
...@@ -265,7 +265,7 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter) ...@@ -265,7 +265,7 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter)
} }
// Allocate URB for control endpoint // Allocate URB for control endpoint
urb = usb_alloc_urb(0); urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) { if (!urb) {
return -ENOMEM; return -ENOMEM;
} }
...@@ -280,7 +280,7 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter) ...@@ -280,7 +280,7 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter)
fifo_init(&ctrl->msg_fifo.f, ARRAY_SIZE(ctrl->msg_fifo.data)); fifo_init(&ctrl->msg_fifo.f, ARRAY_SIZE(ctrl->msg_fifo.data));
// Allocate URBs and buffers for interrupt endpoint // Allocate URBs and buffers for interrupt endpoint
urb = usb_alloc_urb(0); urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) { if (!urb) {
return -ENOMEM; return -ENOMEM;
} }
...@@ -416,7 +416,7 @@ st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev, ...@@ -416,7 +416,7 @@ st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev,
for (j = 0; j < 2; j++) { for (j = 0; j < 2; j++) {
retval = -ENOMEM; retval = -ENOMEM;
urb[j] = usb_alloc_urb(num_packets); urb[j] = usb_alloc_urb(num_packet, GFP_KERNEL);
if (!urb[j]) if (!urb[j])
goto err; goto err;
......
...@@ -201,7 +201,7 @@ static int cpia_usb_open(void *privdata) ...@@ -201,7 +201,7 @@ static int cpia_usb_open(void *privdata)
ucpia->workbuff = ucpia->buffers[1]; ucpia->workbuff = ucpia->buffers[1];
/* We double buffer the Iso lists */ /* We double buffer the Iso lists */
urb = usb_alloc_urb(FRAMES_PER_DESC); urb = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
if (!urb) { if (!urb) {
printk(KERN_ERR "cpia_init_isoc: usb_alloc_urb 0\n"); printk(KERN_ERR "cpia_init_isoc: usb_alloc_urb 0\n");
retval = -ENOMEM; retval = -ENOMEM;
...@@ -222,7 +222,7 @@ static int cpia_usb_open(void *privdata) ...@@ -222,7 +222,7 @@ static int cpia_usb_open(void *privdata)
urb->iso_frame_desc[fx].length = FRAME_SIZE_PER_DESC; urb->iso_frame_desc[fx].length = FRAME_SIZE_PER_DESC;
} }
urb = usb_alloc_urb(FRAMES_PER_DESC); urb = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
if (!urb) { if (!urb) {
printk(KERN_ERR "cpia_init_isoc: usb_alloc_urb 1\n"); printk(KERN_ERR "cpia_init_isoc: usb_alloc_urb 1\n");
retval = -ENOMEM; retval = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment