From: Michael Straube Date: Sat, 4 Sep 2021 12:40:33 +0000 (+0200) Subject: staging: r8188eu: remove init_default_value from hal_ops X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=965da82bcee9278b2dfdf161522c9c3824307d35;p=linux.git staging: r8188eu: remove init_default_value from hal_ops Remove init_default_value from hal_ops and remove its wrapper rtw_hal_def_value_init(). Call rtl8188eu_init_default_value() directly instead Acked-by: Phillip Potter Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210904124033.14244-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c index 9069b52f83ff4..c06b299cf2664 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 d34d26de69d9e..679f9f6e6dbe7 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 d5cf9b0d9a770..b3ea9fc041c65 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 c3ac0ae153f81..49ccdde1b0bbc 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;