From: navin patidar <navin.patidar@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
navin patidar <navin.patidar@gmail.com>
Subject: [PATCH 04/26] staging: rtl8188eu: Remove hw_init_mutex from struct rtw_usb_drv
Date: Sun, 1 Jun 2014 17:46:30 +0530 [thread overview]
Message-ID: <1401625013-11208-4-git-send-email-navin.patidar@gmail.com> (raw)
In-Reply-To: <1401625013-11208-1-git-send-email-navin.patidar@gmail.com>
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/include/drv_types.h | 2 +-
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 6 ++++--
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 6 +-----
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h
index 10cc1a1..f40db1a 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -307,7 +307,7 @@ struct adapter {
#endif
struct adapter *pbuddy_adapter;
- struct mutex *hw_init_mutex;
+ struct mutex hw_init_mutex;
spinlock_t br_ext_lock;
struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE];
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index a220c57..c9906e3 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -997,6 +997,8 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
if (padapter->pbuddy_adapter != NULL)
padapter->pbuddy_adapter->pbuddy_adapter = NULL;
+ mutex_destroy(&padapter->hw_init_mutex);
+
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw\n"));
return _SUCCESS;
@@ -1105,9 +1107,9 @@ int netdev_open(struct net_device *pnetdev)
int ret;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
- _enter_critical_mutex(padapter->hw_init_mutex, NULL);
+ _enter_critical_mutex(&padapter->hw_init_mutex, NULL);
ret = _netdev_open(pnetdev);
- mutex_unlock(padapter->hw_init_mutex);
+ mutex_unlock(&padapter->hw_init_mutex);
return ret;
}
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index d17218f..523d500 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -63,7 +63,6 @@ MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
struct rtw_usb_drv {
struct usb_driver usbdrv;
int drv_registered;
- struct mutex hw_init_mutex;
};
static struct rtw_usb_drv rtl8188e_usb_drv = {
@@ -537,7 +536,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
dvobj->if1 = padapter;
padapter->bDriverStopped = true;
- padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
+ mutex_init(&padapter->hw_init_mutex);
padapter->chip_type = RTL8188E;
pnetdev = rtw_init_netdev(padapter);
@@ -732,8 +731,6 @@ static int __init rtw_drv_entry(void)
DBG_88E(DRV_NAME " driver version=%s\n", DRIVERVERSION);
- mutex_init(&usb_drv->hw_init_mutex);
-
usb_drv->drv_registered = true;
return usb_register(&usb_drv->usbdrv);
}
@@ -746,7 +743,6 @@ static void __exit rtw_drv_halt(void)
usb_drv->drv_registered = false;
usb_deregister(&usb_drv->usbdrv);
- mutex_destroy(&usb_drv->hw_init_mutex);
DBG_88E("-rtw_drv_halt\n");
}
--
1.7.10.4
next prev parent reply other threads:[~2014-06-01 12:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 12:16 [PATCH 01/26] staging: rtl8188eu: Remove function with empty defination ODM_ResetIQKResult() navin patidar
2014-06-01 12:16 ` [PATCH 02/26] staging :rtl8188eu: Remove HalPhyRf.[h|c] files navin patidar
2014-06-01 12:16 ` [PATCH 03/26] staging: rtl8188eu: Remove header file rtw_version.h navin patidar
2014-06-01 12:16 ` navin patidar [this message]
2014-06-01 12:16 ` [PATCH 05/26] staging: rtl8188eu: Use unregistering flag from struct usb_interface navin patidar
2014-06-01 12:16 ` [PATCH 06/26] staging : rtl8188eu: Remove drv_registered from struct rtw_usb_drv navin patidar
2014-06-01 12:16 ` [PATCH 07/26] staging: rtl8188eu: Remove " navin patidar
2014-06-01 12:16 ` [PATCH 08/26] staging: rtl8188eu: Use module_usb_driver() macro navin patidar
2014-06-01 12:16 ` [PATCH 09/26] staging: rtl8188eu: Remove function declarations in usb_intf.c navin patidar
2014-06-01 12:16 ` [PATCH 10/26] staging: rtl8188eu: Remove unused stucture defination struct specific_device_id navin patidar
2014-06-01 12:16 ` [PATCH 11/26] staging: rtl8188eu: Remove unused enum navin patidar
2014-06-01 12:16 ` [PATCH 12/26] staging: rtl8188eu: Remove unused members of struct dvobj_priv navin patidar
2014-06-01 12:16 ` [PATCH 13/26] staging: rtl8188eu: Remove usb_suspend_sema from " navin patidar
2014-06-01 12:16 ` [PATCH 14/26] staging: rtl8188eu: Remove usb_alloc_vendor_req_buf " navin patidar
2014-06-01 12:16 ` [PATCH 15/26] staging: rtl8188eu: Remove unused enum _ADAPTER_TYPE navin patidar
2014-06-01 12:16 ` [PATCH 16/26] staging: rtl8188eu: Remove unused enum _IFACE_TYPE navin patidar
2014-06-01 12:16 ` [PATCH 17/26] staging: rtl8188eu: Remove enum driver_state navin patidar
2014-06-01 12:16 ` [PATCH 18/26] staging: rtl8188eu: Remove DriverState from struct adapter navin patidar
2014-06-01 12:16 ` [PATCH 19/26] staging: rtl8188eu: Remove unused function rtl8188e_clone_haldata() navin patidar
2014-06-01 12:16 ` [PATCH 20/26] staging: rtl8188eu: Remove hal_data_sz from struct adapter navin patidar
2014-06-01 12:16 ` [PATCH 21/26] staging: rtl8188eu: Remove unused member variable of " navin patidar
2014-06-01 12:16 ` [PATCH 22/26] staging: rtl8188eu:Remove EepromAddressSize from " navin patidar
2014-06-01 12:16 ` [PATCH 23/26] staging: rtl8188eu: Remove pbuddy_adapter " navin patidar
2014-06-01 12:16 ` [PATCH 24/26] staging: rtl8188eu: Remove bCardDisableWOHSM " navin patidar
2014-06-01 12:16 ` [PATCH 25/26] staging: rtl8188eu: Remove unused function nat25_handle_frame() navin patidar
2014-06-08 14:04 ` [PATCH v2 " navin patidar
2014-06-01 12:16 ` [PATCH 26/26] staging: rtl8188eu: Remove function with empty defination() navin patidar
2014-06-02 9:08 ` 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=1401625013-11208-4-git-send-email-navin.patidar@gmail.com \
--to=navin.patidar@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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