summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb/octeon-hcd.c
diff options
context:
space:
mode:
authorAaro Koskinen2015-03-22 16:37:49 +0100
committerGreg Kroah-Hartman2015-03-24 13:47:11 +0100
commit31170da59e0ffc90b94c4a6bbfecb657b2c5e3ad (patch)
tree36dbe2b653e79228f131bab330e22322c77a6e26 /drivers/staging/octeon-usb/octeon-hcd.c
parentstaging: octeon-usb: remove useless prefix from pipe flags (diff)
downloadkernel-qcow2-linux-31170da59e0ffc90b94c4a6bbfecb657b2c5e3ad.tar.gz
kernel-qcow2-linux-31170da59e0ffc90b94c4a6bbfecb657b2c5e3ad.tar.xz
kernel-qcow2-linux-31170da59e0ffc90b94c4a6bbfecb657b2c5e3ad.zip
staging: octeon-usb: delete redundant field from octeon_temp_buffer
Since we are not moving/realigning the original pointer returned by kmalloc, we don't need to store the value in a separate field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb/octeon-hcd.c')
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index d0f346cf8e89..1ec70eb490d1 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -432,7 +432,6 @@ struct octeon_hcd {
/**
* struct octeon_temp_buffer - a bounce buffer for USB transfers
- * @temp_buffer: the newly allocated temporary buffer (including meta-data)
* @orig_buffer: the original buffer passed by the USB stack
* @data: the newly allocated temporary buffer (excluding meta-data)
*
@@ -441,7 +440,6 @@ struct octeon_hcd {
* represents it.
*/
struct octeon_temp_buffer {
- void *temp_buffer;
void *orig_buffer;
u8 data[0];
};
@@ -479,7 +477,6 @@ static int octeon_alloc_temp_buffer(struct urb *urb, gfp_t mem_flags)
if (!temp)
return -ENOMEM;
- temp->temp_buffer = temp;
temp->orig_buffer = urb->transfer_buffer;
if (usb_urb_dir_out(urb))
memcpy(temp->data, urb->transfer_buffer,
@@ -510,7 +507,7 @@ static void octeon_free_temp_buffer(struct urb *urb)
urb->actual_length);
urb->transfer_buffer = temp->orig_buffer;
urb->transfer_flags &= ~URB_ALIGNED_TEMP_BUFFER;
- kfree(temp->temp_buffer);
+ kfree(temp);
}
/**