Date:2011-07-06 16:23:53 (9 years 2 months ago)
Author:Werner Almesberger
Commit:0d21f45f7a0daba3e2d83b9e9083ea558a9b1b54
Message:atusb: renamed ctrl_urb to just "urb"

Signed-off-by: Werner Almesberger <werner@almesberger.net>
Files: drivers/spi/atusb.c (2 diffs)

Change Details

drivers/spi/atusb.c
232232{
233233    struct usb_device *dev = atusb->udev;
234234    struct usb_ctrlrequest *req;
235    struct urb *ctrl_urb;
235    struct urb *urb;
236236    int retval = -ENOMEM;
237237
238238    req = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
...... 
245245    req->wIndex = cpu_to_le16(index);
246246    req->wLength = cpu_to_le16(size);
247247
248    ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
249    if (!ctrl_urb)
248    urb = usb_alloc_urb(0, GFP_KERNEL);
249    if (!urb)
250250        goto out_nourb;
251251
252    usb_fill_control_urb(ctrl_urb, dev,
252    usb_fill_control_urb(urb, dev,
253253        requesttype == ATUSB_FROM_DEV ?
254254          usb_rcvctrlpipe(dev, 0) : usb_sndctrlpipe(dev, 0),
255255        (unsigned char *) req, data, size, complete_fn, context);
256256
257    retval = usb_submit_urb(ctrl_urb, GFP_KERNEL);
257    retval = usb_submit_urb(urb, GFP_KERNEL);
258258    if (!retval)
259259        return 0;
260260    dev_info(&dev->dev, "failed submitting read urb, error %d",
261261        retval);
262262    retval = retval == -ENOMEM ? retval : -EIO;
263263
264    usb_free_urb(ctrl_urb);
264    usb_free_urb(urb);
265265out_nourb:
266266    kfree(req);
267267

Archive Download the corresponding diff file



interactive