staging: rtl8188eu: Remove rtw_init_intf_priv()
authornavin patidar <navin.patidar@gmail.com>
Fri, 6 Jun 2014 16:15:11 +0000 (21:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:32:10 +0000 (15:32 -0700)
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index f874270e0b10f7ec91f409bbeeb6349a3d1da94a..a84ee9796ce6e5585eac9fe108c5d64ff254ac2e 100644 (file)
@@ -52,16 +52,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
 
 MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
 
-static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
-{
-       mutex_init(&dvobj->usb_vendor_req_mutex);
-       dvobj->usb_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
-       if (!dvobj->usb_vendor_req_buf)
-               return _FAIL;
-
-       return _SUCCESS;
-}
-
 static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
 {
        int     i;
@@ -125,7 +115,10 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
        else
                pdvobjpriv->ishighspeed = false;
 
-       if (rtw_init_intf_priv(pdvobjpriv) == _FAIL)
+       mutex_init(&pdvobjpriv->usb_vendor_req_mutex);
+       pdvobjpriv->usb_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
+
+       if (!pdvobjpriv->usb_vendor_req_buf)
                goto free_dvobj;
 
        rtw_reset_continual_urb_error(pdvobjpriv);