staging: rtl8723au: Clean up usb_{read,write}_port() usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 16 May 2014 08:05:05 +0000 (10:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 18:34:35 +0000 (11:34 -0700)
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 <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_io.c
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/hal/usb_ops_linux.c
drivers/staging/rtl8723au/include/rtw_io.h
drivers/staging/rtl8723au/include/rtw_recv.h
drivers/staging/rtl8723au/include/usb_ops_linux.h
drivers/staging/rtl8723au/os_dep/usb_ops_linux.c

index 0f26ea8..532ad75 100644 (file)
@@ -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);