From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type from struct rtl819x_ops
Date: Tue, 21 Feb 2023 21:53:43 +0100 [thread overview]
Message-ID: <f1fd37a2d2b90bef8caac31a98f3eeff404b3095.1677010997.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1677010997.git.philipp.g.hortmann@gmail.com>
Remove unchanged entry .nic_type and replace it with constant NIC_8192E.
This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 6 +++---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 2d2f9d4a0ff5..044cab649ff1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -26,7 +26,6 @@ int hwwep = 1;
static char *ifname = "wlan%d";
static const struct rtl819x_ops rtl819xp_ops = {
- .nic_type = NIC_8192E,
};
static struct pci_device_id rtl8192_pci_id_tbl[] = {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index fa72f8891409..f75cc96052d9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -204,7 +204,6 @@ struct rtl8192_tx_ring {
};
struct rtl819x_ops {
- enum nic_t nic_type;
};
struct r8192_priv {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
index 81e1bb856c60..0bc3e013001e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
@@ -39,7 +39,7 @@ bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev)
revision_id = pdev->revision;
pci_read_config_word(pdev, 0x3C, &irq_line);
- priv->card_8192 = priv->ops->nic_type;
+ priv->card_8192 = NIC_8192E;
if (device_id == 0x8192) {
switch (revision_id) {
@@ -64,10 +64,10 @@ bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev)
}
}
- if (priv->ops->nic_type != priv->card_8192) {
+ if (priv->card_8192 != NIC_8192E) {
dev_info(&pdev->dev,
"Detect info(%x) and hardware info(%x) not match!\n",
- priv->ops->nic_type, priv->card_8192);
+ NIC_8192E, priv->card_8192);
dev_info(&pdev->dev,
"Please select proper driver before install!!!!\n");
return false;
--
2.39.2
next prev parent reply other threads:[~2023-02-21 20:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
2023-02-21 20:52 ` [PATCH 1/7] staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops Philipp Hortmann
2023-02-21 20:53 ` [PATCH 2/7] staging: rtl8192e: Remove entry .interrupt_re.. " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 3/7] staging: rtl8192e: Remove entry .tx_check_stuc.. " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 4/7] staging: rtl8192e: Remove entry .rx_check_stuc.. " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 5/7] staging: rtl8192e: Remove dead code " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 6/7] staging: rtl8192e: Remove entry .link_change " Philipp Hortmann
2023-02-21 20:53 ` Philipp Hortmann [this message]
2023-02-22 13:40 ` [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1fd37a2d2b90bef8caac31a98f3eeff404b3095.1677010997.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®