USB: usb-storage: remove us->sensebuf
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 18 Nov 2008 19:08:38 +0000 (14:08 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Jan 2009 17:59:54 +0000 (09:59 -0800)
This patch (as1171) removes us->sensebuf, since it isn't used anywhere.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/usb.c
drivers/usb/storage/usb.h

index eb1a53a3e5ca3135b0173ece397767b88657f0c4..099e07c6af7b9bbcdb606ead9eee911c3c3ef84a 100644 (file)
@@ -474,12 +474,6 @@ static int associate_dev(struct us_data *us, struct usb_interface *intf)
                US_DEBUGP("I/O buffer allocation failed\n");
                return -ENOMEM;
        }
-
-       us->sensebuf = kmalloc(US_SENSE_SIZE, GFP_KERNEL);
-       if (!us->sensebuf) {
-               US_DEBUGP("Sense buffer allocation failed\n");
-               return -ENOMEM;
-       }
        return 0;
 }
 
@@ -875,8 +869,6 @@ static void dissociate_dev(struct us_data *us)
 {
        US_DEBUGP("-- %s\n", __func__);
 
-       kfree(us->sensebuf);
-
        /* Free the device-related DMA-mapped buffers */
        if (us->cr)
                usb_buffer_free(us->pusb_dev, sizeof(*us->cr), us->cr,
index a4ad73bd832df76c0bffc53593c34ac73fabd9d1..e4674fc715e66df930b7d7791625042ed0d3c5ab 100644 (file)
@@ -138,7 +138,6 @@ struct us_data {
        struct usb_ctrlrequest  *cr;             /* control requests     */
        struct usb_sg_request   current_sg;      /* scatter-gather req.  */
        unsigned char           *iobuf;          /* I/O buffer           */
-       unsigned char           *sensebuf;       /* sense data buffer    */
        dma_addr_t              cr_dma;          /* buffer DMA addresses */
        dma_addr_t              iobuf_dma;
        struct task_struct      *ctl_thread;     /* the control thread   */