Commit 520106f6 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Get rid of struct io_priv

No point wrapping struct intf_hdl into struct io_priv just for the
sake of it.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1dbe119b
...@@ -44,8 +44,7 @@ jackson@realtek.com.tw ...@@ -44,8 +44,7 @@ jackson@realtek.com.tw
u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr) u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
{ {
u8 r_val; u8 r_val;
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
r_val = pintfhdl->io_ops._read8(pintfhdl, addr); r_val = pintfhdl->io_ops._read8(pintfhdl, addr);
...@@ -55,8 +54,7 @@ u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr) ...@@ -55,8 +54,7 @@ u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr) u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
{ {
u16 r_val; u16 r_val;
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
r_val = pintfhdl->io_ops._read16(pintfhdl, addr); r_val = pintfhdl->io_ops._read16(pintfhdl, addr);
...@@ -66,8 +64,7 @@ u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr) ...@@ -66,8 +64,7 @@ u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr) u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr)
{ {
u32 r_val; u32 r_val;
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
r_val = pintfhdl->io_ops._read32(pintfhdl, addr); r_val = pintfhdl->io_ops._read32(pintfhdl, addr);
...@@ -76,8 +73,7 @@ u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 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) int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
{ {
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
int ret; int ret;
ret = pintfhdl->io_ops._write8(pintfhdl, addr, val); ret = pintfhdl->io_ops._write8(pintfhdl, addr, val);
...@@ -87,8 +83,7 @@ int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 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) int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
{ {
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
int ret; int ret;
val = cpu_to_le16(val); val = cpu_to_le16(val);
...@@ -96,10 +91,10 @@ int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val) ...@@ -96,10 +91,10 @@ int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
return RTW_STATUS_CODE23a(ret); return RTW_STATUS_CODE23a(ret);
} }
int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val) int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
{ {
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
int ret; int ret;
val = cpu_to_le32(val); val = cpu_to_le32(val);
...@@ -110,8 +105,7 @@ int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 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) int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdata)
{ {
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = (struct intf_hdl*)&pio_priv->intf;
int ret; int ret;
ret = pintfhdl->io_ops._writeN(pintfhdl, addr, length, pdata); 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 ...@@ -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) 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 = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
if ((adapter->bDriverStopped == true) || if ((adapter->bDriverStopped == true) ||
(adapter->bSurpriseRemoved == true)) { (adapter->bSurpriseRemoved == true)) {
...@@ -137,8 +130,7 @@ void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem) ...@@ -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) 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 = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
pintfhdl->io_ops._write_mem(pintfhdl, addr, cnt, pmem); 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) ...@@ -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, void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
struct recv_buf *rbuf) struct recv_buf *rbuf)
{ {
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
if ((adapter->bDriverStopped == true) || if ((adapter->bDriverStopped == true) ||
(adapter->bSurpriseRemoved == true)) { (adapter->bSurpriseRemoved == true)) {
...@@ -164,8 +155,7 @@ void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, ...@@ -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 _rtw_read_port23a_cancel(struct rtw_adapter *adapter)
{ {
void (*_read_port_cancel)(struct intf_hdl *pintfhdl); void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
_read_port_cancel = pintfhdl->io_ops._read_port_cancel; _read_port_cancel = pintfhdl->io_ops._read_port_cancel;
...@@ -176,8 +166,7 @@ void _rtw_read_port23a_cancel(struct rtw_adapter *adapter) ...@@ -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, u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
struct xmit_buf *xbuf) struct xmit_buf *xbuf)
{ {
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
u32 ret = _SUCCESS; u32 ret = _SUCCESS;
ret = pintfhdl->io_ops._write_port(pintfhdl, addr, cnt, xbuf); 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, ...@@ -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 _rtw_write_port23a_cancel(struct rtw_adapter *adapter)
{ {
void (*_write_port_cancel)(struct intf_hdl *pintfhdl); void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &adapter->intf;
struct intf_hdl *pintfhdl = &pio_priv->intf;
_write_port_cancel = pintfhdl->io_ops._write_port_cancel; _write_port_cancel = pintfhdl->io_ops._write_port_cancel;
......
...@@ -1227,7 +1227,7 @@ static unsigned int rtl8723au_inirp_init(struct rtw_adapter *Adapter) ...@@ -1227,7 +1227,7 @@ static unsigned int rtl8723au_inirp_init(struct rtw_adapter *Adapter)
u8 i; u8 i;
struct recv_buf *precvbuf; struct recv_buf *precvbuf;
uint status; uint status;
struct intf_hdl *pintfhdl = &Adapter->iopriv.intf; struct intf_hdl *pintfhdl = &Adapter->intf;
struct recv_priv *precvpriv = &Adapter->recvpriv; struct recv_priv *precvpriv = &Adapter->recvpriv;
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
struct recv_buf *rbuf); struct recv_buf *rbuf);
......
...@@ -817,8 +817,7 @@ void rtl8723au_xmit_tasklet(void *priv) ...@@ -817,8 +817,7 @@ void rtl8723au_xmit_tasklet(void *priv)
void rtl8723au_set_intf_ops(struct rtw_adapter *padapter) void rtl8723au_set_intf_ops(struct rtw_adapter *padapter)
{ {
struct io_priv *piopriv = &padapter->iopriv; struct intf_hdl *pintf = &padapter->intf;
struct intf_hdl *pintf = &piopriv->intf;
struct _io_ops *pops = &pintf->io_ops; struct _io_ops *pops = &pintf->io_ops;
pintf->padapter = padapter; pintf->padapter = padapter;
......
...@@ -242,7 +242,7 @@ struct rtw_adapter { ...@@ -242,7 +242,7 @@ struct rtw_adapter {
struct mlme_ext_priv mlmeextpriv; struct mlme_ext_priv mlmeextpriv;
struct cmd_priv cmdpriv; struct cmd_priv cmdpriv;
struct evt_priv evtpriv; struct evt_priv evtpriv;
struct io_priv iopriv; struct intf_hdl intf;
struct xmit_priv xmitpriv; struct xmit_priv xmitpriv;
struct recv_priv recvpriv; struct recv_priv recvpriv;
struct sta_priv stapriv; struct sta_priv stapriv;
......
...@@ -256,16 +256,6 @@ struct reg_protocol_wt { ...@@ -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); uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
void unregister_intf_hdl(struct intf_hdl *pintfhdl); void unregister_intf_hdl(struct intf_hdl *pintfhdl);
......
...@@ -622,7 +622,6 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, ...@@ -622,7 +622,6 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
padapter->intf_start = &usb_intf_start; padapter->intf_start = &usb_intf_start;
padapter->intf_stop = &usb_intf_stop; padapter->intf_stop = &usb_intf_stop;
/* step init_io_priv */
rtl8723au_set_intf_ops(padapter); rtl8723au_set_intf_ops(padapter);
/* step read_chip_version */ /* step read_chip_version */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment