summaryrefslogtreecommitdiff
path: root/drivers/media/usb/msi2500
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-08-21 12:03:58 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-02 15:47:19 -0300
commitde3f2e2e0ac94c1369722a33e7d7b2ca121ba083 (patch)
treed20158d60da2f661d9044f6fb3239f5b9c979972 /drivers/media/usb/msi2500
parent206ace2288449008742c8ca65f1865e51e83e442 (diff)
[media] msi2500: remove unneeded local pointer on msi2500_isoc_init()
There is no need to keep local copy of usb_device pointer as we have same pointer stored and available easily from device state. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/msi2500')
-rw-r--r--drivers/media/usb/msi2500/msi2500.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c
index 26b133414032..71e0960b46c0 100644
--- a/drivers/media/usb/msi2500/msi2500.c
+++ b/drivers/media/usb/msi2500/msi2500.c
@@ -501,14 +501,12 @@ static void msi2500_isoc_cleanup(struct msi2500_state *s)
/* Both v4l2_lock and vb_queue_lock should be locked when calling this */
static int msi2500_isoc_init(struct msi2500_state *s)
{
- struct usb_device *udev;
struct urb *urb;
int i, j, ret;
dev_dbg(&s->udev->dev, "%s:\n", __func__);
s->isoc_errors = 0;
- udev = s->udev;
ret = usb_set_interface(s->udev, 0, 1);
if (ret)
@@ -527,10 +525,11 @@ static int msi2500_isoc_init(struct msi2500_state *s)
dev_dbg(&s->udev->dev, "Allocated URB at 0x%p\n", urb);
urb->interval = 1;
- urb->dev = udev;
- urb->pipe = usb_rcvisocpipe(udev, 0x81);
+ urb->dev = s->udev;
+ urb->pipe = usb_rcvisocpipe(s->udev, 0x81);
urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
- urb->transfer_buffer = usb_alloc_coherent(udev, ISO_BUFFER_SIZE,
+ urb->transfer_buffer = usb_alloc_coherent(s->udev,
+ ISO_BUFFER_SIZE,
GFP_KERNEL, &urb->transfer_dma);
if (urb->transfer_buffer == NULL) {
dev_err(&s->udev->dev,