From 14af3550a69b9356d81a14f277209e362c3a0024 Mon Sep 17 00:00:00 2001 From: navin patidar Date: Wed, 11 Jun 2014 22:51:30 +0530 Subject: [PATCH] staging: rtl8188eu: Remove function _rtw_write_port_cancel() _rtw_write_port_cancel() is a wrapper function, being used to call usb_write_port_cancel(). Call usb_write_port_cancel() directly and drop _rtw_write_port_cancel(). Signed-off-by: navin patidar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/core/rtw_io.c | 12 ------------ drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 1 - drivers/staging/rtl8188eu/include/rtw_io.h | 5 +---- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c index a0a395c40ef..182074faa58 100644 --- a/drivers/staging/rtl8188eu/core/rtw_io.c +++ b/drivers/staging/rtl8188eu/core/rtw_io.c @@ -126,18 +126,6 @@ int _rtw_write32(struct adapter *adapter, u32 addr, u32 val) return RTW_STATUS_CODE(ret); } -void _rtw_write_port_cancel(struct adapter *adapter) -{ - void (*_write_port_cancel)(struct adapter *pintfhdl); - struct io_priv *pio_priv = &adapter->iopriv; - struct intf_hdl *pintfhdl = &(pio_priv->intf); - - _write_port_cancel = pintfhdl->io_ops._write_port_cancel; - - if (_write_port_cancel) - _write_port_cancel(adapter); -} - int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops)) { struct io_priv *piopriv = &padapter->iopriv; diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c index 02ab5410fd6..cfba5d6f1bf 100644 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c @@ -672,5 +672,4 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops) pops->_write8 = &usb_write8; pops->_write16 = &usb_write16; pops->_write32 = &usb_write32; - pops->_write_port_cancel = &usb_write_port_cancel; } diff --git a/drivers/staging/rtl8188eu/include/rtw_io.h b/drivers/staging/rtl8188eu/include/rtw_io.h index 4f2409209be..9c34328f84a 100644 --- a/drivers/staging/rtl8188eu/include/rtw_io.h +++ b/drivers/staging/rtl8188eu/include/rtw_io.h @@ -50,7 +50,6 @@ struct _io_ops { int (*_write8)(struct adapter *pintfhdl, u32 addr, u8 val); int (*_write16)(struct adapter *pintfhdl, u32 addr, u16 val); int (*_write32)(struct adapter *pintfhdl, u32 addr, u32 val); - void (*_write_port_cancel)(struct adapter *pintfhdl); }; struct io_req { @@ -94,7 +93,7 @@ int _rtw_write32(struct adapter *adapter, u32 addr, u32 val); int usb_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata); u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); -void _rtw_write_port_cancel(struct adapter *adapter); +void usb_write_port_cancel(struct adapter *adapter); #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr)) #define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr)) @@ -106,8 +105,6 @@ void _rtw_write_port_cancel(struct adapter *adapter); _rtw_write16((adapter), (addr), (val)) #define rtw_write32(adapter, addr, val) \ _rtw_write32((adapter), (addr), (val)) -#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter)) - int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops)); diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 25a931ac1fe..491d8e5a6ec 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -194,7 +194,7 @@ static void usb_intf_stop(struct adapter *padapter) rtw_hal_inirp_deinit(padapter); /* cancel out irp */ - rtw_write_port_cancel(padapter); + usb_write_port_cancel(padapter); /* todo:cancel other irps */ -- 2.46.0