From: Jes Sorensen Date: Fri, 16 May 2014 08:05:05 +0000 (+0200) Subject: staging: rtl8723au: Clean up usb_{read,write}_port() usage X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~36^2~759 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97ccc3a6bead88e637c0150b19aaea27387ba6f7;p=pandora-kernel.git staging: rtl8723au: Clean up usb_{read,write}_port() usage Get rid of silly HAL convolution for calling usb_{read,write}_port() functions. Benefit from fact we just have one input address for read_port, so no point storing this and carrying it around. Pick pipe in the local function instead of based on dst/src address. Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_io.c b/drivers/staging/rtl8723au/core/rtw_io.c index 0f26ea8de216..532ad758372f 100644 --- a/drivers/staging/rtl8723au/core/rtw_io.c +++ b/drivers/staging/rtl8723au/core/rtw_io.c @@ -115,23 +115,6 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat return _SUCCESS; } -int _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, - struct recv_buf *rbuf) -{ - struct _io_ops *io_ops = &adapter->io_ops; - - if ((adapter->bDriverStopped == true) || - (adapter->bSurpriseRemoved == true)) { - RT_TRACE(_module_rtl871x_io_c_, _drv_info_, - ("rtw_read_port:bDriverStopped(%d) OR " - "bSurpriseRemoved(%d)", adapter->bDriverStopped, - adapter->bSurpriseRemoved)); - return _FAIL; - } - - return io_ops->_read_port(adapter, addr, cnt, rbuf); -} - void _rtw_read_port23a_cancel(struct rtw_adapter *adapter) { void (*_read_port_cancel)(struct rtw_adapter *adapter); @@ -143,17 +126,6 @@ void _rtw_read_port23a_cancel(struct rtw_adapter *adapter) _read_port_cancel(adapter); } -int _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, - struct xmit_buf *xbuf) -{ - struct _io_ops *io_ops = &adapter->io_ops; - int ret = _SUCCESS; - - ret = io_ops->_write_port(adapter, addr, cnt, xbuf); - - return ret; -} - void _rtw_write_port23a_cancel(struct rtw_adapter *adapter) { void (*_write_port_cancel)(struct rtw_adapter *adapter); Reading git-diff-tree failed