From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 4/5] staging: r8188eu: remove hal_ops
Date: Thu, 7 Oct 2021 12:39:42 +0200 [thread overview]
Message-ID: <20211007103943.8433-5-straube.linux@gmail.com> (raw)
In-Reply-To: <20211007103943.8433-1-straube.linux@gmail.com>
Remove the last pointer hal_deinit from struct hal_ops and call
rtl8188eu_hal_deinit() directly. Remove the now empty struct
hal_ops.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 2 +-
drivers/staging/r8188eu/hal/usb_halinit.c | 6 +-----
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 5 +----
4 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 30ddf174e4df..4e4f4d1c680d 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -31,7 +31,7 @@ uint rtw_hal_deinit(struct adapter *adapt)
{
uint status = _SUCCESS;
- status = adapt->HalFunc.hal_deinit(adapt);
+ status = rtl8188eu_hal_deinit(adapt);
if (status == _SUCCESS)
adapt->hw_init_completed = false;
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 07a29a7cf61d..b4fbbfd0112a 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -978,7 +978,7 @@ static void CardDisableRTL8188EU(struct adapter *Adapter)
Adapter->bFWReady = false;
}
-static u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
+u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
{
DBG_88E("==> %s\n", __func__);
@@ -2133,12 +2133,8 @@ void rtl8188eu_init_default_value(struct adapter *adapt)
void rtl8188eu_set_hal_ops(struct adapter *adapt)
{
- struct hal_ops *halfunc = &adapt->HalFunc;
-
adapt->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
if (!adapt->HalData)
DBG_88E("cant not alloc memory for HAL DATA\n");
adapt->hal_data_sz = sizeof(struct hal_data_8188e);
-
- halfunc->hal_deinit = &rtl8188eu_hal_deinit;
}
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 6d63429d06c6..2c7f1effee6b 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -228,7 +228,6 @@ struct adapter {
void *HalData;
u32 hal_data_sz;
- struct hal_ops HalFunc;
s32 bDriverStopped;
s32 bSurpriseRemoved;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 1810197e81f6..c962cd353f43 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -121,10 +121,6 @@ enum hal_odm_variable {
typedef s32 (*c2h_id_filter)(u8 id);
-struct hal_ops {
- u32 (*hal_deinit)(struct adapter *padapter);
-};
-
#define RF_CHANGE_BY_INIT 0
#define RF_CHANGE_BY_IPS BIT(28)
#define RF_CHANGE_BY_PS BIT(29)
@@ -175,6 +171,7 @@ uint rtw_hal_deinit(struct adapter *padapter);
void rtw_hal_stop(struct adapter *padapter);
u32 rtl8188eu_hal_init(struct adapter *Adapter);
+u32 rtl8188eu_hal_deinit(struct adapter *Adapter);
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
void rtw_hal_clone_data(struct adapter *dst_adapt,
--
2.33.0
next prev parent reply other threads:[~2021-10-07 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 10:39 [PATCH 0/5] staging: r8188eu: remove struct hal_ops Michael Straube
2021-10-07 10:39 ` [PATCH 1/5] staging: r8188eu: remove SetHwRegHandler from hal_ops Michael Straube
2021-10-07 10:39 ` [PATCH 2/5] staging: r8188eu: remove GetHwRegHandler " Michael Straube
2021-10-07 10:39 ` [PATCH 3/5] staging: r8188eu: remove hal_init " Michael Straube
2021-10-07 10:39 ` Michael Straube [this message]
2021-10-07 10:39 ` [PATCH 5/5] staging: r8188eu: rename rtl8188eu_set_hal_ops() Michael Straube
2021-10-10 12:57 ` [PATCH 0/5] staging: r8188eu: remove struct hal_ops Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211007103943.8433-5-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.