staging: rtl8723au: Pass a struct rtw_adapter * to the USB functions
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 26 Apr 2014 16:55:31 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:19 +0000 (10:16 -0700)
This lowers the dependency on struct intf_hdl so we can start getting
rid of if.

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/rtw_io.h
drivers/staging/rtl8723au/include/usb_ops_linux.h
drivers/staging/rtl8723au/os_dep/usb_ops_linux.c

index 442a86b..0f424f9 100644 (file)
@@ -46,7 +46,7 @@ u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
        u8 r_val;
        struct intf_hdl *pintfhdl = &adapter->intf;
 
-       r_val = pintfhdl->io_ops._read8(pintfhdl, addr);
+       r_val = pintfhdl->io_ops._read8(adapter, addr);
 
        return r_val;
 }
@@ -56,7 +56,7 @@ u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
        u16 r_val;
        struct intf_hdl *pintfhdl = &adapter->intf;
 
-       r_val = pintfhdl->io_ops._read16(pintfhdl, addr);
+       r_val = pintfhdl->io_ops._read16(adapter, addr);
 
        return le16_to_cpu(r_val);
 }
@@ -66,7 +66,7 @@ u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr)
        u32 r_val;
        struct intf_hdl *pintfhdl = &adapter->intf;
 
-       r_val = pintfhdl->io_ops._read32(pintfhdl, addr);
+       r_val = pintfhdl->io_ops._read32(adapter, addr);
 
        return le32_to_cpu(r_val);
 }
@@ -76,7 +76,7 @@ int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
        struct intf_hdl *pintfhdl = &adapter->intf;
        int ret;
 
-       ret = pintfhdl->io_ops._write8(pintfhdl, addr, val);
+       ret = pintfhdl->io_ops._write8(adapter, addr, val);
 
        return RTW_STATUS_CODE23a(ret);
 }
@@ -87,7 +87,7 @@ int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
        int ret;
 
        val = cpu_to_le16(val);
-       ret = pintfhdl->io_ops._write16(pintfhdl, addr, val);
+       ret = pintfhdl->io_ops._write16(adapter, addr, val);
 
        return RTW_STATUS_CODE23a(ret);
 }
@@ -98,7 +98,7 @@ int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
        int ret;
 
        val = cpu_to_le32(val);
-       ret = pintfhdl->io_ops._write32(pintfhdl, addr, val);
+       ret = pintfhdl->io_ops._write32(adapter, addr, val);
 
        return RTW_STATUS_CODE23a(ret);
 }
@@ -108,7 +108,7 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat
         struct intf_hdl *pintfhdl = &adapter->intf;
        int ret;
 
-       ret = pintfhdl->io_ops._writeN(pintfhdl, addr, length, pdata);
+       ret = pintfhdl->io_ops._writeN(adapter, addr, length, pdata);
 
        return RTW_STATUS_CODE23a(ret);
 }
@@ -125,14 +125,14 @@ void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
             return;
        }
 
-       pintfhdl->io_ops._read_mem(pintfhdl, addr, cnt, pmem);
+       pintfhdl->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;
 
-       pintfhdl->io_ops._write_mem(pintfhdl, addr, cnt, pmem);
+       pintfhdl->io_ops._write_mem(adapter, addr, cnt, pmem);
 }
 
 void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
@@ -149,18 +149,18 @@ void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
             return;
        }
 
-       pintfhdl->io_ops._read_port(pintfhdl, addr, cnt, rbuf);
+       pintfhdl->io_ops._read_port(adapter, addr, cnt, rbuf);
 }
 
 void _rtw_read_port23a_cancel(struct rtw_adapter *adapter)
 {
-       void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
+       void (*_read_port_cancel)(struct rtw_adapter *adapter);
        struct intf_hdl *pintfhdl = &adapter->intf;
 
        _read_port_cancel = pintfhdl->io_ops._read_port_cancel;
 
        if (_read_port_cancel)
-               _read_port_cancel(pintfhdl);
+               _read_port_cancel(adapter);
 }
 
 u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
@@ -169,18 +169,18 @@ u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
        struct intf_hdl *pintfhdl = &adapter->intf;
        u32 ret = _SUCCESS;
 
-       ret = pintfhdl->io_ops._write_port(pintfhdl, addr, cnt, xbuf);
+       ret = pintfhdl->io_ops._write_port(adapter, addr, cnt, xbuf);
 
        return ret;
 }
 
 void _rtw_write_port23a_cancel(struct rtw_adapter *adapter)
 {
-       void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
+       void (*_write_port_cancel)(struct rtw_adapter *adapter);
        struct intf_hdl *pintfhdl = &adapter->intf;
 
        _write_port_cancel = pintfhdl->io_ops._write_port_cancel;
 
        if (_write_port_cancel)
-               _write_port_cancel(pintfhdl);
+               _write_port_cancel(adapter);
 }