staging: rtl8723au: Get rid of struct io_priv
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 26 Apr 2014 16:55:29 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:18 +0000 (10:16 -0700)
No point wrapping struct intf_hdl into struct io_priv just for the
sake of it.

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
drivers/staging/rtl8723au/os_dep/usb_intf.c

index e862f584900a27f616e8dfe25635d983dfa66881..442a86b69e04e79bb57aadac3607f383fe5e1ac8 100644 (file)
@@ -44,8 +44,7 @@ jackson@realtek.com.tw
 u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
 {
        u8 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        r_val = pintfhdl->io_ops._read8(pintfhdl, addr);
 
@@ -55,8 +54,7 @@ u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
 u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
 {
        u16 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        r_val = pintfhdl->io_ops._read16(pintfhdl, addr);
 
@@ -66,8 +64,7 @@ u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
 u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr)
 {
        u32 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        r_val = pintfhdl->io_ops._read32(pintfhdl, addr);
 
@@ -76,8 +73,7 @@ u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr)
 
 int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl         *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
        int ret;
 
        ret = pintfhdl->io_ops._write8(pintfhdl, addr, val);
@@ -87,8 +83,7 @@ int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
 
 int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl         *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
        int ret;
 
        val = cpu_to_le16(val);
@@ -96,10 +91,10 @@ int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
 
        return RTW_STATUS_CODE23a(ret);
 }
+
 int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
        int ret;
 
        val = cpu_to_le32(val);
@@ -110,8 +105,7 @@ int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
 
 int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdata)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-        struct intf_hdl *pintfhdl = (struct intf_hdl*)&pio_priv->intf;
+        struct intf_hdl *pintfhdl = &adapter->intf;
        int ret;
 
        ret = pintfhdl->io_ops._writeN(pintfhdl, addr, length, pdata);
@@ -120,8 +114,7 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat
 }
 void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        if ((adapter->bDriverStopped == true) ||
            (adapter->bSurpriseRemoved == true)) {
@@ -137,8 +130,7 @@ void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 
 void _rtw_write_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        pintfhdl->io_ops._write_mem(pintfhdl, addr, cnt, pmem);
 }
@@ -146,8 +138,7 @@ void _rtw_write_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
                    struct recv_buf *rbuf)
 {
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        if ((adapter->bDriverStopped == true) ||
            (adapter->bSurpriseRemoved == true)) {
@@ -164,8 +155,7 @@ void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
 void _rtw_read_port23a_cancel(struct rtw_adapter *adapter)
 {
        void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        _read_port_cancel = pintfhdl->io_ops._read_port_cancel;
 
@@ -176,8 +166,7 @@ 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 io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
        u32 ret = _SUCCESS;
 
        ret = pintfhdl->io_ops._write_port(pintfhdl, addr, cnt, xbuf);
@@ -188,8 +177,7 @@ 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 intf_hdl *pintfhdl);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &pio_priv->intf;
+       struct intf_hdl *pintfhdl = &adapter->intf;
 
        _write_port_cancel = pintfhdl->io_ops._write_port_cancel;
 
index 0a6e343373ffd06f977e7d789fc3cd6bc515494c..f5b1b10bed582ed3a76d90a77e1dd62d83042023 100644 (file)
@@ -1227,7 +1227,7 @@ static unsigned int rtl8723au_inirp_init(struct rtw_adapter *Adapter)
        u8 i;
        struct recv_buf *precvbuf;
        uint    status;
-       struct intf_hdl *pintfhdl = &Adapter->iopriv.intf;
+       struct intf_hdl *pintfhdl = &Adapter->intf;
        struct recv_priv *precvpriv = &Adapter->recvpriv;
        u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
                          struct recv_buf *rbuf);
index 1a67255887afd03b0679bdbffa0f492347aa62ba..c861a791f43d9c80bfd04fd93a31b84f3a7c6084 100644 (file)
@@ -817,8 +817,7 @@ void rtl8723au_xmit_tasklet(void *priv)
 
 void rtl8723au_set_intf_ops(struct rtw_adapter *padapter)
 {
-       struct io_priv  *piopriv = &padapter->iopriv;
-       struct intf_hdl *pintf = &piopriv->intf;
+       struct intf_hdl *pintf = &padapter->intf;
        struct _io_ops *pops = &pintf->io_ops;
 
        pintf->padapter = padapter;
index b82d5a1fe60230fb51465006460e5511439c08d6..1e06a37e8af551049456695b83c4856c1e4982b2 100644 (file)
@@ -242,7 +242,7 @@ struct rtw_adapter {
        struct  mlme_ext_priv mlmeextpriv;
        struct  cmd_priv        cmdpriv;
        struct  evt_priv        evtpriv;
-       struct  io_priv iopriv;
+       struct intf_hdl intf;
        struct  xmit_priv       xmitpriv;
        struct  recv_priv       recvpriv;
        struct  sta_priv        stapriv;
index f0f97b447d9e2bf131ddbd5abd25e4b8026d37a5..86ecbea77ed35bd7159eb86db84f22774c1501c4 100644 (file)
@@ -256,16 +256,6 @@ struct reg_protocol_wt {
 };
 
 
-
-/*
-Below is the data structure used by _io_handler
-
-*/
-
-struct io_priv{
-       struct intf_hdl intf;
-};
-
 uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
 void unregister_intf_hdl(struct intf_hdl *pintfhdl);
 
index 87ba2073ede47ac590e62a269235c8f408050932..797393a708103750c0d4a292d18578740cac23e0 100644 (file)
@@ -622,7 +622,6 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
        padapter->intf_start = &usb_intf_start;
        padapter->intf_stop = &usb_intf_stop;
 
-       /* step init_io_priv */
        rtl8723au_set_intf_ops(padapter);
 
        /* step read_chip_version */
This page took 0.030591 seconds and 5 git commands to generate.