Commit 94d2fc63 authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Greg Kroah-Hartman

Staging: rtl8723au: Use USB API functions

This patch replaces driver specific functions(RT_usb_endpoint_is_bulk_in,
RT_usb_endpoint_is_bulk_out, RT_usb_endpoint_is_int_in) with USB API
functions(usb_endpoint_is_bulk_in, usb_endpoint_is_bulk_out,
usb_endpoint_is_int_in).

Also, this patch removes these three RT functions as they are no longer
needed after replacement.

This patch also have one line over 80 characters as limiting it to 80
characters does not make code look good.
Signed-off-by: default avatarVaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a02fd66e
...@@ -59,21 +59,6 @@ static struct usb_driver rtl8723a_usb_drv = { ...@@ -59,21 +59,6 @@ static struct usb_driver rtl8723a_usb_drv = {
static struct usb_driver *usb_drv = &rtl8723a_usb_drv; static struct usb_driver *usb_drv = &rtl8723a_usb_drv;
static inline int RT_usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd)
{
return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd);
}
static inline int RT_usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd)
{
return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd);
}
static inline int RT_usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd)
{
return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
}
static int rtw_init_intf_priv(struct dvobj_priv *dvobj) static int rtw_init_intf_priv(struct dvobj_priv *dvobj)
{ {
mutex_init(&dvobj->usb_vendor_req_mutex); mutex_init(&dvobj->usb_vendor_req_mutex);
...@@ -143,21 +128,21 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) ...@@ -143,21 +128,21 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
le16_to_cpu(pendp_desc->wMaxPacketSize)); le16_to_cpu(pendp_desc->wMaxPacketSize));
DBG_8723A("bInterval =%x\n", pendp_desc->bInterval); DBG_8723A("bInterval =%x\n", pendp_desc->bInterval);
if (RT_usb_endpoint_is_bulk_in(pendp_desc)) { if (usb_endpoint_is_bulk_in(pendp_desc)) {
DBG_8723A("RT_usb_endpoint_is_bulk_in = %x\n", DBG_8723A("usb_endpoint_is_bulk_in = %x\n",
usb_endpoint_num(pendp_desc)); usb_endpoint_num(pendp_desc));
pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] =
usb_endpoint_num(pendp_desc); usb_endpoint_num(pendp_desc);
pdvobjpriv->RtNumInPipes++; pdvobjpriv->RtNumInPipes++;
} else if (RT_usb_endpoint_is_int_in(pendp_desc)) { } else if (usb_endpoint_is_int_in(pendp_desc)) {
DBG_8723A("RT_usb_endpoint_is_int_in = %x, Interval = %x\n", DBG_8723A("usb_endpoint_is_int_in = %x, Interval = %x\n",
usb_endpoint_num(pendp_desc), usb_endpoint_num(pendp_desc),
pendp_desc->bInterval); pendp_desc->bInterval);
pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] =
usb_endpoint_num(pendp_desc); usb_endpoint_num(pendp_desc);
pdvobjpriv->RtNumInPipes++; pdvobjpriv->RtNumInPipes++;
} else if (RT_usb_endpoint_is_bulk_out(pendp_desc)) { } else if (usb_endpoint_is_bulk_out(pendp_desc)) {
DBG_8723A("RT_usb_endpoint_is_bulk_out = %x\n", DBG_8723A("usb_endpoint_is_bulk_out = %x\n",
usb_endpoint_num(pendp_desc)); usb_endpoint_num(pendp_desc));
pdvobjpriv->RtOutPipe[pdvobjpriv->RtNumOutPipes] = pdvobjpriv->RtOutPipe[pdvobjpriv->RtNumOutPipes] =
usb_endpoint_num(pendp_desc); usb_endpoint_num(pendp_desc);
......
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