[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6538f1e158664837f6d1e7a20583ff20fc4f1403.1677010997.git.philipp.g.hortmann@gmail.com>
Date: Tue, 21 Feb 2023 21:53:17 +0100
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 4/7] staging: rtl8192e: Remove entry .rx_check_stuc.. from
struct rtl819x_ops
Remove entry .rx_check_stuck_handler and replace it with function name
rtl92e_is_rx_stuck. This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 410c03833b9f..15eab612b08f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -30,7 +30,6 @@ static const struct rtl819x_ops rtl819xp_ops = {
.link_change = rtl92e_link_change,
.rx_command_packet_handler = NULL,
.irq_clear = rtl92e_clear_irq,
- .rx_check_stuck_handler = rtl92e_is_rx_stuck,
};
static struct pci_device_id rtl8192_pci_id_tbl[] = {
@@ -1063,9 +1062,7 @@ static enum reset_type _rtl92e_tx_check_stuck(struct net_device *dev)
static enum reset_type _rtl92e_rx_check_stuck(struct net_device *dev)
{
- struct r8192_priv *priv = rtllib_priv(dev);
-
- if (priv->ops->rx_check_stuck_handler(dev))
+ if (rtl92e_is_rx_stuck(dev))
return RESET_TYPE_SILENT;
return RESET_TYPE_NORESET;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 87be8aaa7822..43e1c651e6d2 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -211,7 +211,6 @@ struct rtl819x_ops {
struct sk_buff *skb,
struct rx_desc *pdesc);
void (*irq_clear)(struct net_device *dev);
- bool (*rx_check_stuck_handler)(struct net_device *dev);
};
struct r8192_priv {
--
2.39.2
Powered by blists - more mailing lists