Commit 664b044b authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: remove static declaration vnt_tx_context_complete

Moving vnt_tx_context in visibility of vnt_tx_context_complete
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 93eac3b1
...@@ -57,8 +57,6 @@ ...@@ -57,8 +57,6 @@
#define URB_ASYNC_UNLINK 0 #define URB_ASYNC_UNLINK 0
#endif #endif
static void vnt_tx_context_complete(struct urb *urb);
int vnt_control_out(struct vnt_private *priv, u8 request, u16 value, int vnt_control_out(struct vnt_private *priv, u8 request, u16 value,
u16 index, u16 length, u8 *buffer) u16 index, u16 length, u8 *buffer)
{ {
...@@ -262,39 +260,6 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb) ...@@ -262,39 +260,6 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
return status; return status;
} }
int vnt_tx_context(struct vnt_private *priv,
struct vnt_usb_send_context *context)
{
int status;
struct urb *urb;
if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
context->in_use = false;
return STATUS_RESOURCES;
}
urb = context->urb;
usb_fill_bulk_urb(urb,
priv->usb,
usb_sndbulkpipe(priv->usb, 3),
context->data,
context->buf_len,
vnt_tx_context_complete,
context);
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status != 0) {
dev_dbg(&priv->usb->dev, "Submit Tx URB failed %d\n", status);
context->in_use = false;
return STATUS_FAILURE;
}
return STATUS_PENDING;
}
static void vnt_tx_context_complete(struct urb *urb) static void vnt_tx_context_complete(struct urb *urb)
{ {
struct vnt_usb_send_context *context = urb->context; struct vnt_usb_send_context *context = urb->context;
...@@ -327,3 +292,35 @@ static void vnt_tx_context_complete(struct urb *urb) ...@@ -327,3 +292,35 @@ static void vnt_tx_context_complete(struct urb *urb)
return; return;
} }
int vnt_tx_context(struct vnt_private *priv,
struct vnt_usb_send_context *context)
{
int status;
struct urb *urb;
if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
context->in_use = false;
return STATUS_RESOURCES;
}
urb = context->urb;
usb_fill_bulk_urb(urb,
priv->usb,
usb_sndbulkpipe(priv->usb, 3),
context->data,
context->buf_len,
vnt_tx_context_complete,
context);
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status != 0) {
dev_dbg(&priv->usb->dev, "Submit Tx URB failed %d\n", status);
context->in_use = false;
return STATUS_FAILURE;
}
return STATUS_PENDING;
}
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