staging: r8188eu: remove rtl8188eu_set_hal_ops function
authorIvan Safonov <insafonov@gmail.com>
Sun, 18 Sep 2016 17:26:16 +0000 (00:26 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 11:33:49 +0000 (13:33 +0200)
rtl8188eu_set_hal_ops only allocates
HalData member of adapter structure.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/usb_halinit.c
drivers/staging/rtl8188eu/include/usb_hal.h
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index cc27d641550b6baec0d10490b24fc84f807c5e5f..a3c43341005e77c9e4bfd6e53eed1324202fd509 100644 (file)
@@ -2040,10 +2040,3 @@ void rtw_hal_def_value_init(struct adapter *adapt)
        for (i = 0; i < HP_THERMAL_NUM; i++)
                haldata->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0;
 }
-
-void rtl8188eu_set_hal_ops(struct adapter *adapt)
-{
-       adapt->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
-       if (!adapt->HalData)
-               DBG_88E("cant not alloc memory for HAL DATA\n");
-}
index fd9921f22848c71a56420735d442f4ac9d6400fd..3bcf74fc809280f5f1fa2cbb4efadcaf82588225 100644 (file)
@@ -15,6 +15,4 @@
 #ifndef __USB_HAL_H__
 #define __USB_HAL_H__
 
-void rtl8188eu_set_hal_ops(struct adapter *padapter);
-
 #endif /* __USB_HAL_H__ */
index cf33f65df8ff5b1c34f0763ee5fc50c2c1294f22..3da2ab01c9e7cb56d0f24c397d5d9fa0e77b86f3 100644 (file)
@@ -28,6 +28,8 @@
 #include <usb_hal.h>
 #include <rtw_ioctl.h>
 
+#include "rtl8188e_hal.h"
+
 #define USB_VENDER_ID_REALTEK          0x0bda
 
 /* DID_USB_v916_20130116 */
@@ -361,8 +363,9 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
                padapter->pmondev = pmondev;
        }
 
-       /* step 2. hook HalFunc, allocate HalData */
-       rtl8188eu_set_hal_ops(padapter);
+       padapter->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
+       if (!padapter->HalData)
+               DBG_88E("cant not alloc memory for HAL DATA\n");
 
        padapter->intf_start = &usb_intf_start;
        padapter->intf_stop = &usb_intf_stop;