staging: rtl8192e: Unwind pointer to pointer to rtl92e_set_channel()
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sat, 18 Nov 2023 08:51:18 +0000 (09:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Nov 2023 12:46:18 +0000 (12:46 +0000)
Replace pointer to function to pointer to rtl92e_set_channel() with
pointer to rtl92e_set_channel(). This increases readability of the code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a96bac1f34e669a3b2fc4940a0a2d850564a5975.1700296319.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h

index 98b25768f6141a046d00c85bd98004f85a83a780..2789f428e4f9410574b277f03cacb0e9bb404910 100644 (file)
@@ -226,16 +226,6 @@ static void _rtl92e_tx_timeout(struct net_device *dev, unsigned int txqueue)
        netdev_info(dev, "TXTIMEOUT");
 }
 
-static void _rtl92e_set_chan(struct net_device *dev, u8 ch)
-{
-       struct r8192_priv *priv = rtllib_priv(dev);
-
-       priv->chan = ch;
-
-       if (priv->rf_set_chan)
-               priv->rf_set_chan(dev, priv->chan);
-}
-
 static void _rtl92e_update_cap(struct net_device *dev, u16 cap)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
@@ -685,7 +675,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
        struct r8192_priv *priv = rtllib_priv(dev);
 
        priv->rtllib->softmac_hard_start_xmit   = _rtl92e_hard_start_xmit;
-       priv->rtllib->set_chan                  = _rtl92e_set_chan;
+       priv->rtllib->set_chan                  = rtl92e_set_channel;
        priv->rtllib->link_change               = rtl92e_link_change;
        priv->rtllib->softmac_data_hard_start_xmit = _rtl92e_hard_data_xmit;
        priv->rtllib->check_nic_enough_desc     = _rtl92e_check_nic_enough_desc;
@@ -694,7 +684,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
        priv->rtllib->set_wireless_mode         = rtl92e_set_wireless_mode;
        priv->rtllib->leisure_ps_leave          = rtl92e_leisure_ps_leave;
        priv->rtllib->set_bw_mode_handler       = rtl92e_set_bw_mode;
-       priv->rf_set_chan                       = rtl92e_set_channel;
 
        priv->rtllib->sta_wake_up = rtl92e_hw_wakeup;
        priv->rtllib->enter_sleep_state = rtl92e_enter_sleep;
index 9b0be6dff6279e9ce8a8b4b91ca87a3f36a9d7c9..348df71e122e98f524fef94a78849829cd57f474 100644 (file)
@@ -228,8 +228,6 @@ struct r8192_priv {
        struct rt_stats stats;
        struct iw_statistics                    wstats;
 
-       void (*rf_set_chan)(struct net_device *dev, u8 ch);
-
        struct rx_desc *rx_ring;
        struct sk_buff  *rx_buf[MAX_RX_COUNT];
        dma_addr_t      rx_ring_dma;