staging: rtl8723au: Eliminate struct intf_hdl
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 26 Apr 2014 16:55:34 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:19 +0000 (10:16 -0700)
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/usb_halinit.c
drivers/staging/rtl8723au/hal/usb_ops_linux.c
drivers/staging/rtl8723au/include/drv_types.h
drivers/staging/rtl8723au/include/rtw_io.h

index 0f424f946dbb7c3b2992f023a9914d16fbb13bfb..01022113950af9081d9341c8220b6e085dd7f330 100644 (file)
@@ -44,9 +44,9 @@ jackson@realtek.com.tw
 u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
 {
        u8 r_val;
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
-       r_val = pintfhdl->io_ops._read8(adapter, addr);
+       r_val = io_ops->_read8(adapter, addr);
 
        return r_val;
 }
@@ -54,9 +54,9 @@ u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
 u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
 {
        u16 r_val;
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
-       r_val = pintfhdl->io_ops._read16(adapter, addr);
+       r_val = io_ops->_read16(adapter, addr);
 
        return le16_to_cpu(r_val);
 }
@@ -64,57 +64,57 @@ u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
 u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr)
 {
        u32 r_val;
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
-       r_val = pintfhdl->io_ops._read32(adapter, addr);
+       r_val = io_ops->_read32(adapter, addr);
 
        return le32_to_cpu(r_val);
 }
 
 int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
        int ret;
 
-       ret = pintfhdl->io_ops._write8(adapter, addr, val);
+       ret = io_ops->_write8(adapter, addr, val);
 
        return RTW_STATUS_CODE23a(ret);
 }
 
 int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
        int ret;
 
        val = cpu_to_le16(val);
-       ret = pintfhdl->io_ops._write16(adapter, addr, val);
+       ret = io_ops->_write16(adapter, addr, val);
 
        return RTW_STATUS_CODE23a(ret);
 }
 
 int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
        int ret;
 
        val = cpu_to_le32(val);
-       ret = pintfhdl->io_ops._write32(adapter, addr, val);
+       ret = io_ops->_write32(adapter, addr, val);
 
        return RTW_STATUS_CODE23a(ret);
 }
 
 int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdata)
 {
-        struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
        int ret;
 
-       ret = pintfhdl->io_ops._writeN(adapter, addr, length, pdata);
+       ret = io_ops->_writeN(adapter, addr, length, pdata);
 
        return RTW_STATUS_CODE23a(ret);
 }
 void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
        if ((adapter->bDriverStopped == true) ||
            (adapter->bSurpriseRemoved == true)) {
@@ -125,20 +125,20 @@ void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
             return;
        }
 
-       pintfhdl->io_ops._read_mem(adapter, addr, cnt, pmem);
+       io_ops->_read_mem(adapter, addr, cnt, pmem);
 }
 
 void _rtw_write_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
-       pintfhdl->io_ops._write_mem(adapter, addr, cnt, pmem);
+       io_ops->_write_mem(adapter, addr, cnt, pmem);
 }
 
 void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
-                   struct recv_buf *rbuf)
+                      struct recv_buf *rbuf)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
        if ((adapter->bDriverStopped == true) ||
            (adapter->bSurpriseRemoved == true)) {
@@ -149,15 +149,15 @@ void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
             return;
        }
 
-       pintfhdl->io_ops._read_port(adapter, addr, cnt, rbuf);
+       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);
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
-       _read_port_cancel = pintfhdl->io_ops._read_port_cancel;
+       _read_port_cancel = io_ops->_read_port_cancel;
 
        if (_read_port_cancel)
                _read_port_cancel(adapter);
@@ -166,10 +166,10 @@ void _rtw_read_port23a_cancel(struct rtw_adapter *adapter)
 u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
                    struct xmit_buf *xbuf)
 {
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
        u32 ret = _SUCCESS;
 
-       ret = pintfhdl->io_ops._write_port(adapter, addr, cnt, xbuf);
+       ret = io_ops->_write_port(adapter, addr, cnt, xbuf);
 
        return ret;
 }
@@ -177,9 +177,9 @@ u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
 void _rtw_write_port23a_cancel(struct rtw_adapter *adapter)
 {
        void (*_write_port_cancel)(struct rtw_adapter *adapter);
-       struct intf_hdl *pintfhdl = &adapter->intf;
+       struct _io_ops *io_ops = &adapter->io_ops;
 
-       _write_port_cancel = pintfhdl->io_ops._write_port_cancel;
+       _write_port_cancel = io_ops->_write_port_cancel;
 
        if (_write_port_cancel)
                _write_port_cancel(adapter);
index 1dd2a08a0963aa54adbe9358dfce2ba798b4ce61..f300349e88cfbf7a209d1f953295dbc3ddd539b6 100644 (file)
@@ -1227,14 +1227,14 @@ static unsigned int rtl8723au_inirp_init(struct rtw_adapter *Adapter)
        u8 i;
        struct recv_buf *precvbuf;
        uint    status;
-       struct intf_hdl *pintfhdl = &Adapter->intf;
+       struct _io_ops *io_ops = &Adapter->io_ops;
        struct recv_priv *precvpriv = &Adapter->recvpriv;
        u32 (*_read_port)(struct rtw_adapter *padapter, u32 addr, u32 cnt,
                          struct recv_buf *rbuf);
        u32 (*_read_interrupt)(struct rtw_adapter *padapter, u32 addr);
        struct hal_data_8723a   *pHalData = GET_HAL_DATA(Adapter);
 
-       _read_port = pintfhdl->io_ops._read_port;
+       _read_port = io_ops->_read_port;
 
        status = _SUCCESS;
 
@@ -1255,7 +1255,7 @@ static unsigned int rtl8723au_inirp_init(struct rtw_adapter *Adapter)
                precvbuf++;
                precvpriv->free_recv_buf_queue_cnt--;
        }
-       _read_interrupt = pintfhdl->io_ops._read_interrupt;
+       _read_interrupt = io_ops->_read_interrupt;
        if (_read_interrupt(Adapter, RECV_INT_IN_ADDR) == false) {
                RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
                         ("usb_rx_init: usb_read_interrupt error\n"));
index b5332888226c38c05f5c624b0cc8f6b5eedb83be..12997a5cd7a8e6fef70bf508776ea5afd865dbb4 100644 (file)
@@ -824,8 +824,7 @@ void rtl8723au_xmit_tasklet(void *priv)
 
 void rtl8723au_set_intf_ops(struct rtw_adapter *padapter)
 {
-       struct intf_hdl *pintf = &padapter->intf;
-       struct _io_ops *pops = &pintf->io_ops;
+       struct _io_ops *pops = &padapter->io_ops;
 
        memset((u8 *)pops, 0, sizeof(struct _io_ops));
 
index 1e06a37e8af551049456695b83c4856c1e4982b2..c2c192410aa58d10c12f6be80bed08c7c9b826f1 100644 (file)
@@ -242,7 +242,7 @@ struct rtw_adapter {
        struct  mlme_ext_priv mlmeextpriv;
        struct  cmd_priv        cmdpriv;
        struct  evt_priv        evtpriv;
-       struct intf_hdl intf;
+       struct _io_ops  io_ops;
        struct  xmit_priv       xmitpriv;
        struct  recv_priv       recvpriv;
        struct  sta_priv        stapriv;
index 745d0ef25af30410e46aafec9948eb42404ca741..fffe028750c20c066b4313558bf3c6fadc4df2b7 100644 (file)
@@ -97,7 +97,6 @@
 #define _INTF_ASYNC_   BIT(0)  /* support async io */
 
 struct intf_priv;
-struct intf_hdl;
 
 struct _io_ops
 {
@@ -135,10 +134,6 @@ struct io_req {
        u8 *cnxt;
 };
 
-struct intf_hdl {
-       struct _io_ops  io_ops;
-};
-
 struct reg_protocol_rd {
 
 #ifdef __LITTLE_ENDIAN
This page took 0.083533 seconds and 5 git commands to generate.