From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 4/6] staging: r8188eu: remove intf_start pointer
Date: Mon, 6 Feb 2023 21:17:58 +0100 [thread overview]
Message-ID: <20230206201800.139195-5-martin@kaiser.cx> (raw)
In-Reply-To: <20230206201800.139195-1-martin@kaiser.cx>
Remove the intf_start pointer that points to a media-specific start
function (pci, usb, sdio, ...). The r8188eu driver supports only usb.
We could call usb_intf_start directly instead of going through the
function pointer. usb_intf_start is just a call to rtl8188eu_inirp_init so
we can directly replace the intf_start pointer with rtl8188eu_inirp_init.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/os_dep/os_intfs.c | 6 ++----
drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ------
3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 7b170eed66b3..40f13f185895 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -171,7 +171,6 @@ struct adapter {
s8 signal_strength;
void *cmdThread;
- void (*intf_start)(struct adapter *adapter);
void (*intf_stop)(struct adapter *adapter);
struct net_device *pnetdev;
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 4130e8fe2952..e48dbdfefedb 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -631,8 +631,7 @@ static int _netdev_open(struct net_device *pnetdev)
pr_info("can't init mlme_ext_priv\n");
goto netdev_open_error;
}
- if (padapter->intf_start)
- padapter->intf_start(padapter);
+ rtl8188eu_inirp_init(padapter);
rtw_led_control(padapter, LED_CTL_NO_LINK);
@@ -684,8 +683,7 @@ static int ips_netdrv_open(struct adapter *padapter)
if (status == _FAIL)
goto netdev_open_error;
- if (padapter->intf_start)
- padapter->intf_start(padapter);
+ rtl8188eu_inirp_init(padapter);
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 5000);
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index 1f114b1fc4d5..ca9a7c0e5159 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -152,11 +152,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
}
-static void usb_intf_start(struct adapter *padapter)
-{
- rtl8188eu_inirp_init(padapter);
-}
-
static void usb_intf_stop(struct adapter *padapter)
{
/* cancel in irp */
@@ -313,7 +308,6 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, struct usb_interface *pusb
SET_NETDEV_DEV(pnetdev, dvobj_to_dev(dvobj));
padapter = rtw_netdev_priv(pnetdev);
- padapter->intf_start = &usb_intf_start;
padapter->intf_stop = &usb_intf_stop;
/* step read_chip_version */
--
2.30.2
next prev parent reply other threads:[~2023-02-06 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 20:17 [PATCH 0/6] staging: r8188eu: remove intf_start and intf_stop Martin Kaiser
2023-02-06 20:17 ` [PATCH 1/6] staging: r8188eu: pass a struct recv_buf to rtw_read_port Martin Kaiser
2023-02-06 20:17 ` [PATCH 2/6] staging: r8188eu: use standard error codes in rtw_read_port Martin Kaiser
2023-02-06 20:17 ` [PATCH 3/6] staging: r8188eu: use standard error codes in rtl8188eu_inirp_init Martin Kaiser
2023-02-06 20:17 ` Martin Kaiser [this message]
2023-02-06 20:17 ` [PATCH 5/6] staging: r8188eu: handle rtl8188eu_inirp_init errors Martin Kaiser
2023-02-06 20:18 ` [PATCH 6/6] staging: r8188eu: remove intf_stop pointer Martin Kaiser
2023-02-07 6:13 ` [PATCH 0/6] staging: r8188eu: remove intf_start and intf_stop Philipp Hortmann
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=20230206201800.139195-5-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/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®