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
husb->udev = udev;
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");
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");
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");
goto probe_error;
}
......@@ -578,7 +578,7 @@ static void * hci_usb_probe(struct usb_device *udev, unsigned int ifnum, const s
pipe = usb_rcvintpipe(udev, ep->bEndpointAddress);
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");
goto probe_error;
}
......
......@@ -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;
memset(iforce, 0, sizeof(struct iforce));
iforce->irq = usb_alloc_urb(0);
iforce->irq = usb_alloc_urb(0, GFP_KERNEL);
if (!iforce->irq) {
kfree(iforce);
return NULL;
}
iforce->out = usb_alloc_urb(0);
iforce->out = usb_alloc_urb(0, GFP_KERNEL);
if (!iforce->out) {
usb_free_urb(iforce->irq);
kfree(iforce);
return NULL;
}
iforce->ctrl = usb_alloc_urb(0);
iforce->ctrl = usb_alloc_urb(0, GFP_KERNEL);
if (!iforce->ctrl) {
usb_free_urb(iforce->out);
usb_free_urb(iforce->irq);
......
......@@ -265,7 +265,7 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter)
}
// Allocate URB for control endpoint
urb = usb_alloc_urb(0);
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
return -ENOMEM;
}
......@@ -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));
// Allocate URBs and buffers for interrupt endpoint
urb = usb_alloc_urb(0);
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
return -ENOMEM;
}
......@@ -416,7 +416,7 @@ st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev,
for (j = 0; j < 2; j++) {
retval = -ENOMEM;
urb[j] = usb_alloc_urb(num_packets);
urb[j] = usb_alloc_urb(num_packet, GFP_KERNEL);
if (!urb[j])
goto err;
......
......@@ -201,7 +201,7 @@ static int cpia_usb_open(void *privdata)
ucpia->workbuff = ucpia->buffers[1];
/* We double buffer the Iso lists */
urb = usb_alloc_urb(FRAMES_PER_DESC);
urb = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
if (!urb) {
printk(KERN_ERR "cpia_init_isoc: usb_alloc_urb 0\n");
retval = -ENOMEM;
......@@ -222,7 +222,7 @@ static int cpia_usb_open(void *privdata)
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) {
printk(KERN_ERR "cpia_init_isoc: usb_alloc_urb 1\n");
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