staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()
[linux-2.6-microblaze.git] / drivers / staging / rtl8188eu / core / rtw_p2p.c
index e6ce5ce..0840470 100644 (file)
@@ -50,7 +50,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
 
        DBG_88E("%s\n", __func__);
 
-       pdata_attr = rtw_zmalloc(MAX_P2P_IE_LEN);
+       pdata_attr = kzalloc(MAX_P2P_IE_LEN, GFP_KERNEL);
 
        pstart = pdata_attr;
        pcur = pdata_attr;
@@ -891,7 +891,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
                /* Check P2P Device Info ATTR */
                if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, NULL, (uint *)&attr_contentlen)) {
                        DBG_88E("[%s] Got P2P DEVICE INFO Attr!!\n", __func__);
-                       pattr_content = rtw_zmalloc(attr_contentlen);
+                       pattr_content = kzalloc(attr_contentlen, GFP_KERNEL);
                        pbuf = pattr_content;
                        if (pattr_content) {
                                u8 num_of_secdev_type;
@@ -1738,13 +1738,13 @@ u8 p2p_ps_wk_cmd(struct adapter *padapter, u8 p2p_ps_state, u8 enqueue)
                return res;
 
        if (enqueue) {
-               ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (ph2c == NULL) {
                        res = _FAIL;
                        goto exit;
                }
 
-               pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+               pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
                if (pdrvextra_cmd_parm == NULL) {
                        kfree(ph2c);
                        res = _FAIL;