mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-12-23 12:37:42 +00:00
remove rtw_usb_bulk_msg() macro
No one is using this wrapper macro, so just remove it as it is pointless. Link: https://lore.kernel.org/r/20210730092417.1014392-11-gregkh@linuxfoundation.org
This commit is contained in:
parent
ca6e4a43f7
commit
904e95f373
@ -1,17 +1,17 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __OSDEP_BSD_SERVICE_H_
|
||||
#define __OSDEP_BSD_SERVICE_H_
|
||||
|
||||
@ -129,10 +129,10 @@
|
||||
*
|
||||
*/
|
||||
struct rtw_timer_list {
|
||||
struct callout callout;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
struct callout callout;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct workqueue_struct;
|
||||
struct work_struct;
|
||||
@ -545,8 +545,6 @@ void rtw_usb_set_intfdata(struct usb_interface *intf, void *data);
|
||||
void rtw_usb_fill_bulk_urb(struct urb *urb, struct usb_device *udev,
|
||||
struct usb_host_endpoint *uhe, void *buf,
|
||||
int length, usb_complete_t callback, void *arg);
|
||||
int rtw_usb_bulk_msg(struct usb_device *udev, struct usb_host_endpoint *uhe,
|
||||
void *data, int len, uint16_t *pactlen, usb_timeout_t timeout);
|
||||
void *usb_get_intfdata(struct usb_interface *intf);
|
||||
int usb_linux_init_endpoints(struct usb_device *udev);
|
||||
|
||||
@ -659,42 +657,42 @@ __inline static void rtw_list_delete(_list *plist)
|
||||
INIT_LIST_HEAD(plist);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(void *ctx)
|
||||
{
|
||||
_timer *timer = (_timer *)ctx;
|
||||
|
||||
rtw_mtx_lock(NULL);
|
||||
if (callout_pending(&timer->callout)) {
|
||||
/* callout was reset */
|
||||
rtw_mtx_unlock(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!callout_active(&timer->callout)) {
|
||||
/* callout was stopped */
|
||||
rtw_mtx_unlock(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
callout_deactivate(&timer->callout);
|
||||
|
||||
timer->function(timer->arg);
|
||||
|
||||
rtw_mtx_unlock(NULL);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl padapter, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
callout_init(&ptimer->callout, CALLOUT_MPSAFE);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(void *ctx)
|
||||
{
|
||||
_timer *timer = (_timer *)ctx;
|
||||
|
||||
rtw_mtx_lock(NULL);
|
||||
if (callout_pending(&timer->callout)) {
|
||||
/* callout was reset */
|
||||
rtw_mtx_unlock(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!callout_active(&timer->callout)) {
|
||||
/* callout was stopped */
|
||||
rtw_mtx_unlock(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
callout_deactivate(&timer->callout);
|
||||
|
||||
timer->function(timer->arg);
|
||||
|
||||
rtw_mtx_unlock(NULL);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl padapter, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
callout_init(&ptimer->callout, CALLOUT_MPSAFE);
|
||||
}
|
||||
|
||||
__inline static void _set_timer(_timer *ptimer,u32 delay_time)
|
||||
{
|
||||
if (ptimer->function && ptimer->arg) {
|
||||
if (ptimer->function && ptimer->arg) {
|
||||
rtw_mtx_lock(NULL);
|
||||
callout_reset(&ptimer->callout, delay_time, timer_hdl, ptimer);
|
||||
callout_reset(&ptimer->callout, delay_time, timer_hdl, ptimer);
|
||||
rtw_mtx_unlock(NULL);
|
||||
}
|
||||
}
|
||||
@ -704,7 +702,7 @@ __inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
||||
rtw_mtx_lock(NULL);
|
||||
callout_drain(&ptimer->callout);
|
||||
rtw_mtx_unlock(NULL);
|
||||
*bcancelled = 1; /* assume an pending timer to be canceled */
|
||||
*bcancelled = 1; /* assume an pending timer to be canceled */
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
|
@ -47,15 +47,10 @@
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
|
||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), (timeout_ms))
|
||||
#else
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), \
|
||||
((timeout_ms) == 0) || ((timeout_ms) * HZ / 1000 > 0) ? ((timeout_ms) * HZ / 1000) : 1)
|
||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
|
||||
((timeout_ms) == 0) || ((timeout_ms) * HZ / 1000 > 0) ? ((timeout_ms) * HZ / 1000) : 1)
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user