Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e8fa0ce65c58dbb60be279c4e33534650dcacc31
Commit:     e8fa0ce65c58dbb60be279c4e33534650dcacc31
Parent:     7f477358e2384c54b190cc3b6ce28277050a041b
Author:     Pete Zaitcev <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 02:17:49 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:54:58 2007 -0700

    usblp: Make use of URB_FREE_BUFFER
    
    Employ the new API URB_FREE_BUFFER that we've got. There was talk of a 
combined
    constructor for this case, but apparently it's not happening, so just set 
the
    flag explicitly for now.
    
    Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/class/usblp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 30d5a13..9696668 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -331,9 +331,6 @@ static void usblp_bulk_write(struct urb *urb)
        wake_up(&usblp->wwait);
        spin_unlock(&usblp->lock);
 
-       /* XXX Use usb_setup_bulk_urb when available. Talk to Marcel. */
-       kfree(urb->transfer_buffer);
-       urb->transfer_buffer = NULL;    /* Not refcounted, so to be safe... */
        usb_free_urb(urb);
 }
 
@@ -719,6 +716,7 @@ static ssize_t usblp_write(struct file *file, const char 
__user *buffer, size_t
                        usb_sndbulkpipe(usblp->dev,
                          
usblp->protocol[usblp->current_protocol].epwrite->bEndpointAddress),
                        writebuf, transfer_length, usblp_bulk_write, usblp);
+               writeurb->transfer_flags |= URB_FREE_BUFFER;
                usb_anchor_urb(writeurb, &usblp->urbs);
 
                if (copy_from_user(writebuf,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to