staging: rtl8192e: Remove entry .initialize_ad.. from struct rtl819x_ops
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 19 Feb 2023 21:15:46 +0000 (22:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Mar 2023 16:03:46 +0000 (17:03 +0100)
Remove entry .initialize_adapter and replace it with function name
rtl92e_start_adapter. This increases readability of the code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7457e18ea9f3b2415bf41fca8ac2b22349d2edd1.1676840647.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 7b8683a..3bebc11 100644 (file)
@@ -27,7 +27,6 @@ static char *ifname = "wlan%d";
 
 static const struct rtl819x_ops rtl819xp_ops = {
        .nic_type                       = NIC_8192E,
-       .initialize_adapter             = rtl92e_start_adapter,
        .link_change                    = rtl92e_link_change,
        .tx_fill_descriptor             = rtl92e_fill_tx_desc,
        .tx_fill_cmd_descriptor         = rtl92e_fill_tx_cmd_desc,
@@ -690,7 +689,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
        priv->rtllib->ieee_up = 1;
 
        priv->up_first_time = 0;
-       init_status = priv->ops->initialize_adapter(dev);
+       init_status = rtl92e_start_adapter(dev);
        if (!init_status) {
                netdev_err(dev, "%s(): Initialization failed!\n", __func__);
                return -1;
@@ -2381,7 +2380,7 @@ bool rtl92e_enable_nic(struct net_device *dev)
                return false;
        }
 
-       init_status = priv->ops->initialize_adapter(dev);
+       init_status = rtl92e_start_adapter(dev);
        if (!init_status) {
                netdev_warn(dev, "%s(): Initialization failed!\n", __func__);
                priv->bdisable_nic = false;
index 541b7aa..9edadc6 100644 (file)
@@ -206,7 +206,6 @@ struct rtl8192_tx_ring {
 struct rtl819x_ops {
        enum nic_t nic_type;
        void (*init_before_adapter_start)(struct net_device *dev);
-       bool (*initialize_adapter)(struct net_device *dev);
        void (*link_change)(struct net_device *dev);
        void (*tx_fill_descriptor)(struct net_device *dev,
                                   struct tx_desc *tx_desc,