Commit 51ea6292 authored by Jarod Wilson's avatar Jarod Wilson Committed by Mauro Carvalho Chehab

[media] mceusb: passing ep to request_packet is redundant

Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 35e5ed7f
...@@ -615,11 +615,10 @@ static void mce_async_callback(struct urb *urb, struct pt_regs *regs) ...@@ -615,11 +615,10 @@ static void mce_async_callback(struct urb *urb, struct pt_regs *regs)
} }
/* request incoming or send outgoing usb packet - used to initialize remote */ /* request incoming or send outgoing usb packet - used to initialize remote */
static void mce_request_packet(struct mceusb_dev *ir, static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data,
struct usb_endpoint_descriptor *ep, int size, int urb_type)
unsigned char *data, int size, int urb_type)
{ {
int res; int res, pipe;
struct urb *async_urb; struct urb *async_urb;
struct device *dev = ir->dev; struct device *dev = ir->dev;
unsigned char *async_buf; unsigned char *async_buf;
...@@ -639,10 +638,11 @@ static void mce_request_packet(struct mceusb_dev *ir, ...@@ -639,10 +638,11 @@ static void mce_request_packet(struct mceusb_dev *ir,
} }
/* outbound data */ /* outbound data */
usb_fill_int_urb(async_urb, ir->usbdev, pipe = usb_sndintpipe(ir->usbdev,
usb_sndintpipe(ir->usbdev, ep->bEndpointAddress), ir->usb_ep_out->bEndpointAddress);
usb_fill_int_urb(async_urb, ir->usbdev, pipe,
async_buf, size, (usb_complete_t)mce_async_callback, async_buf, size, (usb_complete_t)mce_async_callback,
ir, ep->bInterval); ir, ir->usb_ep_out->bInterval);
memcpy(async_buf, data, size); memcpy(async_buf, data, size);
} else if (urb_type == MCEUSB_RX) { } else if (urb_type == MCEUSB_RX) {
...@@ -670,12 +670,12 @@ static void mce_request_packet(struct mceusb_dev *ir, ...@@ -670,12 +670,12 @@ static void mce_request_packet(struct mceusb_dev *ir,
static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size) static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size)
{ {
mce_request_packet(ir, ir->usb_ep_out, data, size, MCEUSB_TX); mce_request_packet(ir, data, size, MCEUSB_TX);
} }
static void mce_sync_in(struct mceusb_dev *ir, unsigned char *data, int size) static void mce_sync_in(struct mceusb_dev *ir, unsigned char *data, int size)
{ {
mce_request_packet(ir, ir->usb_ep_in, data, size, MCEUSB_RX); mce_request_packet(ir, data, size, MCEUSB_RX);
} }
/* Send data out the IR blaster port(s) */ /* Send data out the IR blaster port(s) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment