staging: rtl8188eu: Remove function _rtw_write_port()
authornavin patidar <navin.patidar@gmail.com>
Wed, 11 Jun 2014 17:21:29 +0000 (22:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:34:01 +0000 (15:34 -0700)
_rtw_write_port() is a wrapper function, being used to call usb_write_port().
Call usb_write_port() directly and drop _rtw_write_port().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_io.c
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
drivers/staging/rtl8188eu/hal/usb_ops_linux.c
drivers/staging/rtl8188eu/include/rtw_io.h

index 627a8521b658d80fa93d6385b067223d11972b6b..a0a395c40eff80be4f95644d1cf2e95bf49ac34f 100644 (file)
@@ -126,22 +126,6 @@ int _rtw_write32(struct adapter *adapter, u32 addr, u32 val)
        return RTW_STATUS_CODE(ret);
 }
 
-u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       u32 (*_write_port)(struct adapter *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       u32 ret = _SUCCESS;
-
-
-       _write_port = pintfhdl->io_ops._write_port;
-
-       ret = _write_port(adapter, addr, cnt, pmem);
-
-
-       return ret;
-}
-
 void _rtw_write_port_cancel(struct adapter *adapter)
 {
        void (*_write_port_cancel)(struct adapter *pintfhdl);
index 3476f88983302add9de5f150119528e5162ee310..4bc2ce0bb319b2791744873627993143262510a9 100644 (file)
@@ -397,7 +397,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
                }
                ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
 
-               inner_ret = rtw_write_port(adapt, ff_hwaddr, w_sz, (unsigned char *)pxmitbuf);
+               inner_ret = usb_write_port(adapt, ff_hwaddr, w_sz, (unsigned char *)pxmitbuf);
 
                rtw_count_tx_stats(adapt, pxmitframe, sz);
 
@@ -608,7 +608,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
 
        /* 3 4. write xmit buffer to USB FIFO */
        ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe);
-       rtw_write_port(adapt, ff_hwaddr, pbuf_tail, (u8 *)pxmitbuf);
+       usb_write_port(adapt, ff_hwaddr, pbuf_tail, (u8 *)pxmitbuf);
 
        /* 3 5. update statisitc */
        pbuf_tail -= (pfirstframe->agg_num * TXDESC_SIZE);
index 95f6c10f4fa654f670e86ad7d6000a5e9c1147a7..02ab5410fd6085ac20ebf65e53b5687dc2ea8b55 100644 (file)
@@ -672,6 +672,5 @@ void rtl8188eu_set_intf_ops(struct _io_ops  *pops)
        pops->_write8 = &usb_write8;
        pops->_write16 = &usb_write16;
        pops->_write32 = &usb_write32;
-       pops->_write_port = &usb_write_port;
        pops->_write_port_cancel = &usb_write_port_cancel;
 }
index 0ca46e80c159feb83eb66b185efa32cf61636cb6..4f2409209be241a20eec20b74c2bfdb01362a8b6 100644 (file)
@@ -50,8 +50,6 @@ struct _io_ops {
        int (*_write8)(struct adapter *pintfhdl, u32 addr, u8 val);
        int (*_write16)(struct adapter *pintfhdl, u32 addr, u16 val);
        int (*_write32)(struct adapter *pintfhdl, u32 addr, u32 val);
-       u32 (*_write_port)(struct adapter *pintfhdl, u32 addr, u32 cnt,
-                          u8 *pmem);
        void (*_write_port_cancel)(struct adapter *pintfhdl);
 };
 
@@ -95,7 +93,7 @@ int _rtw_write16(struct adapter *adapter, u32 addr, u16 val);
 int _rtw_write32(struct adapter *adapter, u32 addr, u32 val);
 int usb_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata);
 
-u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
+u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
 void _rtw_write_port_cancel(struct adapter *adapter);
 
 #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
@@ -108,8 +106,6 @@ void _rtw_write_port_cancel(struct adapter *adapter);
        _rtw_write16((adapter), (addr), (val))
 #define  rtw_write32(adapter, addr, val)                               \
        _rtw_write32((adapter), (addr), (val))
-#define rtw_write_port(adapter, addr, cnt, mem)                                \
-       _rtw_write_port((adapter), (addr), (cnt), (mem))
 #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))