aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2012-07-15 12:31:31 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-30 20:50:19 -0400
commit6ac454aa98be6b9d5ead482263d37dd92cbcb0eb (patch)
tree43c2e3854f6082829cd86e8c296aa8f842f0c29a /drivers/media
parent0208c15e5c639ff08b9767fee907a99bcc94b2f5 (diff)
[media] Minor cleanups for MCE USB
Signed-off-by: Sean Young <sean@mess.org> Cc: Jarod Wilson <jarod@wilsonet.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/rc/mceusb.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index b7d3588fe87a..f38d9a8c6880 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -417,14 +417,12 @@ struct mceusb_dev {
417 /* usb */ 417 /* usb */
418 struct usb_device *usbdev; 418 struct usb_device *usbdev;
419 struct urb *urb_in; 419 struct urb *urb_in;
420 struct usb_endpoint_descriptor *usb_ep_in;
421 struct usb_endpoint_descriptor *usb_ep_out; 420 struct usb_endpoint_descriptor *usb_ep_out;
422 421
423 /* buffers and dma */ 422 /* buffers and dma */
424 unsigned char *buf_in; 423 unsigned char *buf_in;
425 unsigned int len_in; 424 unsigned int len_in;
426 dma_addr_t dma_in; 425 dma_addr_t dma_in;
427 dma_addr_t dma_out;
428 426
429 enum { 427 enum {
430 CMD_HEADER = 0, 428 CMD_HEADER = 0,
@@ -693,7 +691,7 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
693 dev_info(dev, "Raw IR data, %d pulse/space samples\n", ir->rem); 691 dev_info(dev, "Raw IR data, %d pulse/space samples\n", ir->rem);
694} 692}
695 693
696static void mce_async_callback(struct urb *urb, struct pt_regs *regs) 694static void mce_async_callback(struct urb *urb)
697{ 695{
698 struct mceusb_dev *ir; 696 struct mceusb_dev *ir;
699 int len; 697 int len;
@@ -740,7 +738,7 @@ static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data,
740 pipe = usb_sndintpipe(ir->usbdev, 738 pipe = usb_sndintpipe(ir->usbdev,
741 ir->usb_ep_out->bEndpointAddress); 739 ir->usb_ep_out->bEndpointAddress);
742 usb_fill_int_urb(async_urb, ir->usbdev, pipe, 740 usb_fill_int_urb(async_urb, ir->usbdev, pipe,
743 async_buf, size, (usb_complete_t)mce_async_callback, 741 async_buf, size, mce_async_callback,
744 ir, ir->usb_ep_out->bInterval); 742 ir, ir->usb_ep_out->bInterval);
745 memcpy(async_buf, data, size); 743 memcpy(async_buf, data, size);
746 744
@@ -1038,7 +1036,7 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
1038 ir_raw_event_handle(ir->rc); 1036 ir_raw_event_handle(ir->rc);
1039} 1037}
1040 1038
1041static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs) 1039static void mceusb_dev_recv(struct urb *urb)
1042{ 1040{
1043 struct mceusb_dev *ir; 1041 struct mceusb_dev *ir;
1044 int buf_len; 1042 int buf_len;
@@ -1338,7 +1336,6 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
1338 ir->model = model; 1336 ir->model = model;
1339 1337
1340 /* Saving usb interface data for use by the transmitter routine */ 1338 /* Saving usb interface data for use by the transmitter routine */
1341 ir->usb_ep_in = ep_in;
1342 ir->usb_ep_out = ep_out; 1339 ir->usb_ep_out = ep_out;
1343 1340
1344 if (dev->descriptor.iManufacturer 1341 if (dev->descriptor.iManufacturer
@@ -1356,8 +1353,8 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
1356 goto rc_dev_fail; 1353 goto rc_dev_fail;
1357 1354
1358 /* wire up inbound data handler */ 1355 /* wire up inbound data handler */
1359 usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, 1356 usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp,
1360 maxp, (usb_complete_t) mceusb_dev_recv, ir, ep_in->bInterval); 1357 mceusb_dev_recv, ir, ep_in->bInterval);
1361 ir->urb_in->transfer_dma = ir->dma_in; 1358 ir->urb_in->transfer_dma = ir->dma_in;
1362 ir->urb_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; 1359 ir->urb_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
1363 1360