From 5827c6555ce5edfba003deedc00cc30efca600f7 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Sat, 26 Apr 2014 18:55:21 +0200 Subject: [PATCH] staging: rtl8723au: Fold rtw_init_io_priv23a() into rtl8723au_set_intf_ops() Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_io.c | 18 ------------------ drivers/staging/rtl8723au/hal/usb_ops_linux.c | 9 ++++++++- drivers/staging/rtl8723au/include/rtw_io.h | 2 -- drivers/staging/rtl8723au/include/usb_ops.h | 2 +- drivers/staging/rtl8723au/os_dep/usb_intf.c | 2 +- 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_io.c b/drivers/staging/rtl8723au/core/rtw_io.c index e53179f..ef859fb 100644 --- a/drivers/staging/rtl8723au/core/rtw_io.c +++ b/drivers/staging/rtl8723au/core/rtw_io.c @@ -213,21 +213,3 @@ void _rtw_write_port23a_cancel(struct rtw_adapter *adapter) if (_write_port_cancel) _write_port_cancel(pintfhdl); } - -int rtw_init_io_priv23a(struct rtw_adapter *padapter, - void (*set_intf_ops)(struct _io_ops *pops)) -{ - struct io_priv *piopriv = &padapter->iopriv; - struct intf_hdl *pintf = &piopriv->intf; - - if (set_intf_ops == NULL) - return _FAIL; - - piopriv->padapter = padapter; - pintf->padapter = padapter; - pintf->pintf_dev = adapter_to_dvobj(padapter); - - set_intf_ops(&pintf->io_ops); - - return _SUCCESS; -} diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c b/drivers/staging/rtl8723au/hal/usb_ops_linux.c index 0311cdf..a785bb5 100644 --- a/drivers/staging/rtl8723au/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8723au/hal/usb_ops_linux.c @@ -815,8 +815,15 @@ void rtl8723au_xmit_tasklet(void *priv) } } -void rtl8723au_set_intf_ops(struct _io_ops *pops) +void rtl8723au_set_intf_ops(struct rtw_adapter *padapter) { + struct io_priv *piopriv = &padapter->iopriv; + struct intf_hdl *pintf = &piopriv->intf; + struct _io_ops *pops = &pintf->io_ops; + + piopriv->padapter = padapter; + pintf->padapter = padapter; + pintf->pintf_dev = adapter_to_dvobj(padapter); memset((u8 *)pops, 0, sizeof(struct _io_ops)); diff --git a/drivers/staging/rtl8723au/include/rtw_io.h b/drivers/staging/rtl8723au/include/rtw_io.h index eea6dc2..0072b81 100644 --- a/drivers/staging/rtl8723au/include/rtw_io.h +++ b/drivers/staging/rtl8723au/include/rtw_io.h @@ -373,8 +373,6 @@ void ioreq_write8(struct rtw_adapter *adapter, u32 addr, u8 val); void ioreq_write16(struct rtw_adapter *adapter, u32 addr, u16 val); void ioreq_write32(struct rtw_adapter *adapter, u32 addr, u32 val); -int rtw_init_io_priv23a(struct rtw_adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops)); - uint alloc_io_queue(struct rtw_adapter *adapter); void free_io_queue(struct rtw_adapter *adapter); void async_bus_io(struct io_queue *pio_q); diff --git a/drivers/staging/rtl8723au/include/usb_ops.h b/drivers/staging/rtl8723au/include/usb_ops.h index 2195054..1013406 100644 --- a/drivers/staging/rtl8723au/include/usb_ops.h +++ b/drivers/staging/rtl8723au/include/usb_ops.h @@ -45,7 +45,7 @@ enum { void rtl8723au_set_hw_type(struct rtw_adapter *padapter); #define hal_set_hw_type rtl8723au_set_hw_type -void rtl8723au_set_intf_ops(struct _io_ops *pops); +void rtl8723au_set_intf_ops(struct rtw_adapter *padapter); void rtl8723au_recv_tasklet(void *priv); diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c index 9f819ea..87ba207 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_intf.c +++ b/drivers/staging/rtl8723au/os_dep/usb_intf.c @@ -623,7 +623,7 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, padapter->intf_stop = &usb_intf_stop; /* step init_io_priv */ - rtw_init_io_priv23a(padapter, rtl8723au_set_intf_ops); + rtl8723au_set_intf_ops(padapter); /* step read_chip_version */ rtw_hal_read_chip_version23a(padapter); -- 2.7.4