[v2,4/5] staging: rtl8192e: Remove variable InitialGainHandler
Commit Message
The variable InitialGainHandler is set in only one place throughout the
driver. This patch removes the variable and calls the real function
directly instead, eliminating the unnecessary indirection.
Additionally, the removal of the variable aligns with the checkpatch
guidelines by removing the use of CamelCase.
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
v2: Removed the variable and called the function direction instead of
just renaming the variable as suggested by Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 4 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtllib.h | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)
@@ -1129,11 +1129,11 @@ void rtl92e_scan_op_backup(struct net_device *dev, u8 Operation)
if (priv->up) {
switch (Operation) {
case SCAN_OPT_BACKUP:
- priv->rtllib->InitialGainHandler(dev, IG_Backup);
+ rtl92e_init_gain(dev, IG_Backup);
break;
case SCAN_OPT_RESTORE:
- priv->rtllib->InitialGainHandler(dev, IG_Restore);
+ rtl92e_init_gain(dev, IG_Restore);
break;
}
}
@@ -731,7 +731,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->SetHwRegHandler = rtl92e_set_reg;
priv->rtllib->AllowAllDestAddrHandler = rtl92e_set_monitor_mode;
- priv->rtllib->InitialGainHandler = rtl92e_init_gain;
priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq;
priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave;
priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup;
@@ -1709,7 +1709,6 @@ struct rtllib_device {
bool (*GetNmodeSupportBySecCfg)(struct net_device *dev);
bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
- void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
void (*ScanOperationBackupHandler)(struct net_device *dev,
u8 Operation);
void (*SetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val);