Skip to content

Commit

Permalink
staging: rtl8188eu: remove padapter from struct mlme_ext_priv
Browse files Browse the repository at this point in the history
struct mlme_ext_priv is an element of struct adapter. Use container_of
to get a pointer to the enclosing struct.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Martin Kaiser authored and Greg Kroah-Hartman committed May 10, 2021
1 parent 24aa9ca commit 706321a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -4014,8 +4014,6 @@ int init_mlme_ext_priv(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;

pmlmeext->padapter = padapter;

init_mlme_ext_priv_value(padapter);
pmlmeinfo->accept_addba_req = pregistrypriv->accept_addba_req;

Expand All @@ -4038,7 +4036,7 @@ int init_mlme_ext_priv(struct adapter *padapter)

void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
{
struct adapter *padapter = pmlmeext->padapter;
struct adapter *padapter = container_of(pmlmeext, struct adapter, mlmeextpriv);

if (!padapter)
return;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ struct p2p_oper_class_map {
};

struct mlme_ext_priv {
struct adapter *padapter;
u8 mlmeext_init;
atomic_t event_seq;
u16 mgnt_seq;
Expand Down

0 comments on commit 706321a

Please sign in to comment.