From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from viti.kaiser.cx (viti.kaiser.cx [85.214.81.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 856346D00 for ; Thu, 8 Apr 2021 19:57:00 +0000 (UTC) Received: from ipservice-092-217-074-086.092.217.pools.vodafone-ip.de ([92.217.74.86] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lUalu-0005PV-MC; Thu, 08 Apr 2021 21:56:58 +0200 From: Martin Kaiser To: Larry Finger , Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 08/12] staging: rtl8188eu: move another static array from .h to .c Date: Thu, 8 Apr 2021 21:55:57 +0200 Message-Id: <20210408195601.4762-8-martin@kaiser.cx> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210408195601.4762-1-martin@kaiser.cx> References: <20210408195601.4762-1-martin@kaiser.cx> X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Move the declaration of the rtw_cmd_callback array from rtw_cmd.h to rtw_cmd.c. The _RTW_CMD_C_ symbol is now obsolete and can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 19 ++++++++++++++++++- drivers/staging/rtl8188eu/include/rtw_cmd.h | 20 -------------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index bf1e49404e64..0bbe5ee918ce 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -4,7 +4,6 @@ * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. * ******************************************************************************/ -#define _RTW_CMD_C_ #include #include @@ -30,6 +29,24 @@ static struct cmd_hdl wlancmds[] = { {sizeof(struct SetChannelPlan_param), set_chplan_hdl} }; +static struct _cmd_callback rtw_cmd_callback[] = { + {_JoinBss_CMD_, &rtw_joinbss_cmd_callback}, + {_DisConnect_CMD_, &rtw_disassoc_cmd_callback}, + {_CreateBss_CMD_, &rtw_createbss_cmd_callback}, + {_SetOpMode_CMD_, NULL}, + {_SiteSurvey_CMD_, &rtw_survey_cmd_callback}, + {_SetAuth_CMD_, NULL}, + {_SetKey_CMD_, NULL}, + {_SetStaKey_CMD_, &rtw_setstaKey_cmdrsp_callback}, + {_SetAssocSta_CMD_, &rtw_setassocsta_cmdrsp_callback}, + {_AddBAReq_CMD_, NULL}, + {_SetChannel_CMD_, NULL}, + {_TX_Beacon_CMD_, NULL}, + {_Set_MLME_EVT_CMD_, NULL}, + {_Set_Drv_Extra_CMD_, NULL}, + {_SetChannelPlan_CMD_, NULL}, +}; + /* * Caller and the rtw_cmd_thread can protect cmd_q by spin_lock. * No irqsave is necessary. diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 002a797c6d0a..68b8ad1a412f 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -361,24 +361,4 @@ enum rtw_h2c_cmd { MAX_H2CCMD }; -#ifdef _RTW_CMD_C_ -static struct _cmd_callback rtw_cmd_callback[] = { - {_JoinBss_CMD_, &rtw_joinbss_cmd_callback}, - {_DisConnect_CMD_, &rtw_disassoc_cmd_callback}, - {_CreateBss_CMD_, &rtw_createbss_cmd_callback}, - {_SetOpMode_CMD_, NULL}, - {_SiteSurvey_CMD_, &rtw_survey_cmd_callback}, - {_SetAuth_CMD_, NULL}, - {_SetKey_CMD_, NULL}, - {_SetStaKey_CMD_, &rtw_setstaKey_cmdrsp_callback}, - {_SetAssocSta_CMD_, &rtw_setassocsta_cmdrsp_callback}, - {_AddBAReq_CMD_, NULL}, - {_SetChannel_CMD_, NULL}, - {_TX_Beacon_CMD_, NULL}, - {_Set_MLME_EVT_CMD_, NULL}, - {_Set_Drv_Extra_CMD_, NULL}, - {_SetChannelPlan_CMD_, NULL}, -}; -#endif - #endif /* _CMD_H_ */ -- 2.20.1