Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155419
b: refs/heads/master
c: aea0d43
h: refs/heads/master
i:
  155417: 5510636
  155415: 608bb28
v: v3
  • Loading branch information
Pete Zaitcev authored and Greg Kroah-Hartman committed Jul 12, 2009
1 parent 5737bdd commit 1292019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f408adeb517e1b17102acd889251d5ab60c1fb88
refs/heads/master: aea0d43bdec32cc4a7ba53d6c82616de3964357a
14 changes: 4 additions & 10 deletions trunk/drivers/staging/rspiusb/rspiusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ static void piusb_write_bulk_callback(struct urb *urb)
__func__, status);

pdx->pendingWrite = 0;
usb_buffer_free(urb->dev, urb->transfer_buffer_length,
urb->transfer_buffer, urb->transfer_dma);
kfree(urb->transfer_buffer);
}

int piusb_output(struct ioctl_struct *io, unsigned char *uBuf, int len,
Expand All @@ -457,9 +456,7 @@ int piusb_output(struct ioctl_struct *io, unsigned char *uBuf, int len,

urb = usb_alloc_urb(0, GFP_KERNEL);
if (urb != NULL) {
kbuf =
usb_buffer_alloc(pdx->udev, len, GFP_KERNEL,
&urb->transfer_dma);
kbuf = kmalloc(len, GFP_KERNEL);
if (!kbuf) {
dev_err(&pdx->udev->dev, "buffer_alloc failed\n");
return -ENOMEM;
Expand All @@ -470,7 +467,6 @@ int piusb_output(struct ioctl_struct *io, unsigned char *uBuf, int len,
}
usb_fill_bulk_urb(urb, pdx->udev, pdx->hEP[io->endpoint], kbuf,
len, piusb_write_bulk_callback, pdx);
urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
err = usb_submit_urb(urb, GFP_KERNEL);
if (err) {
dev_err(&pdx->udev->dev,
Expand Down Expand Up @@ -641,7 +637,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
numPagesRequired =
((uaddr & ~PAGE_MASK) + count + ~PAGE_MASK) >> PAGE_SHIFT;
dbg("Number of pages needed = %d", numPagesRequired);
maplist_p = vmalloc(numPagesRequired * sizeof(struct page));
maplist_p = vmalloc(numPagesRequired * sizeof(struct page *));
if (!maplist_p) {
dbg("Can't Allocate Memory for maplist_p");
return -ENOMEM;
Expand Down Expand Up @@ -712,9 +708,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
usb_fill_bulk_urb(pdx->PixelUrb[frameInfo][i],
pdx->udev,
epAddr,
(dma_addr_t *) sg_dma_address(&pdx->
sgl[frameInfo]
[i]),
NULL, // non-DMA HC? buy a better hardware
sg_dma_len(&pdx->sgl[frameInfo][i]),
piusb_readPIXEL_callback, (void *)pdx);
pdx->PixelUrb[frameInfo][i]->transfer_dma =
Expand Down

0 comments on commit 1292019

Please sign in to comment.