From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
martin@kaiser.cx, fmdefrancesco@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 6/6] staging: r8188eu: remove init_default_value from hal_ops
Date: Sat, 4 Sep 2021 14:40:33 +0200 [thread overview]
Message-ID: <20210904124033.14244-7-straube.linux@gmail.com> (raw)
In-Reply-To: <20210904124033.14244-1-straube.linux@gmail.com>
Remove init_default_value from hal_ops and remove its wrapper
rtw_hal_def_value_init(). Call rtl8188eu_init_default_value()
directly instead
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 6 ------
drivers/staging/r8188eu/hal/usb_halinit.c | 4 +---
drivers/staging/r8188eu/include/hal_intf.h | 5 +----
drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ++--
4 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 9069b52f83ff..c06b299cf266 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -6,12 +6,6 @@
#include "../include/drv_types.h"
#include "../include/hal_intf.h"
-void rtw_hal_def_value_init(struct adapter *adapt)
-{
- if (adapt->HalFunc.init_default_value)
- adapt->HalFunc.init_default_value(adapt);
-}
-
void rtw_hal_free_data(struct adapter *adapt)
{
if (adapt->HalFunc.free_hal_data)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index d34d26de69d9..679f9f6e6dbe 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2196,7 +2196,7 @@ static void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt)
rtw_write8(adapt, bcn_ctrl_reg, rtw_read8(adapt, bcn_ctrl_reg) | BIT(1));
}
-static void rtl8188eu_init_default_value(struct adapter *adapt)
+void rtl8188eu_init_default_value(struct adapter *adapt)
{
struct hal_data_8188e *haldata;
struct pwrctrl_priv *pwrctrlpriv;
@@ -2249,8 +2249,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->InitSwLeds = &rtl8188eu_InitSwLeds;
halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
- halfunc->init_default_value = &rtl8188eu_init_default_value;
-
halfunc->SetHwRegHandler = &SetHwReg8188EU;
halfunc->GetHwRegHandler = &GetHwReg8188EU;
halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index d5cf9b0d9a77..b3ea9fc041c6 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -149,8 +149,6 @@ struct hal_ops {
void (*dm_init)(struct adapter *padapter);
void (*dm_deinit)(struct adapter *padapter);
- void (*init_default_value)(struct adapter *padapter);
-
void (*enable_interrupt)(struct adapter *padapter);
void (*disable_interrupt)(struct adapter *padapter);
s32 (*interrupt_handler)(struct adapter *padapter);
@@ -262,8 +260,7 @@ void rtl8188eu_set_hal_ops(struct adapter *padapter);
void rtl8188eu_interface_configure(struct adapter *adapt);
void ReadAdapterInfo8188EU(struct adapter *Adapter);
-
-void rtw_hal_def_value_init(struct adapter *padapter);
+void rtl8188eu_init_default_value(struct adapter *adapt);
void rtw_hal_free_data(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index c3ac0ae153f8..49ccdde1b0bb 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -782,7 +782,7 @@ static u8 rtw_init_default_value(struct adapter *padapter)
rtw_update_registrypriv_dev_network(padapter);
/* hal_priv */
- rtw_hal_def_value_init(padapter);
+ rtl8188eu_init_default_value(padapter);
/* misc. */
padapter->bReadPortCancel = false;
@@ -801,7 +801,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
/* hal_priv */
- rtw_hal_def_value_init(padapter);
+ rtl8188eu_init_default_value(padapter);
padapter->bReadPortCancel = false;
padapter->bWritePortCancel = false;
padapter->bRxRSSIDisplay = 0;
--
2.33.0
next prev parent reply other threads:[~2021-09-04 12:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
2021-09-04 12:40 ` [PATCH 1/6] staging: r8188eu: remove intf_chip_configure " Michael Straube
2021-09-04 12:40 ` [PATCH 2/6] staging: r8188eu: remove read_adapter_info " Michael Straube
2021-09-04 12:40 ` [PATCH 3/6] staging: r8188eu: remove read_chip_version " Michael Straube
2021-09-04 12:40 ` [PATCH 4/6] staging: r8188eu: remove wrapper around ReadChipVersion8188E() Michael Straube
2021-09-04 12:40 ` [PATCH 5/6] staging: r8188eu: remove GetHalODMVarHandler from hal_ops Michael Straube
2021-09-04 12:40 ` Michael Straube [this message]
2021-09-04 18:27 ` [PATCH 0/6] staging: r8188eu: remove some functions " Phillip Potter
2021-09-04 19:06 ` Michael Straube
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=20210904124033.14244-7-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=fmdefrancesco@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox