diff options
author | Ivan Safonov <insafonov@gmail.com> | 2016-10-08 01:01:25 +0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-16 10:25:27 +0200 |
commit | 63764c7fb6e159a5b2abe782f079bf75661b2489 (patch) | |
tree | 98e89d57ae61d0a6afbd95957dbbfc55b40cc6df /drivers/staging/rtl8188eu | |
parent | aaa27e8c4abccc2c8fc3da6e7c092fc4f7a279ed (diff) |
staging:r8188eu: change type of the precv_buf member of recv_priv structure
To avoid unnecessary typecast.
To use compiler type checking.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/include/rtw_recv.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 1c7a9a084b49..d3d64fab348f 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -46,10 +46,10 @@ int rtw_hal_init_recv_priv(struct adapter *padapter) goto exit; } - precvpriv->precv_buf = precvpriv->pallocated_recv_buf; + precvpriv->precv_buf = (struct recv_buf *)precvpriv->pallocated_recv_buf; - precvbuf = (struct recv_buf *)precvpriv->precv_buf; + precvbuf = precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); @@ -86,7 +86,7 @@ void rtw_hal_free_recv_priv(struct adapter *padapter) struct recv_buf *precvbuf; struct recv_priv *precvpriv = &padapter->recvpriv; - precvbuf = (struct recv_buf *)precvpriv->precv_buf; + precvbuf = precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { usb_free_urb(precvbuf->purb); diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 71d6ade70554..3675edb61942 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -987,7 +987,7 @@ u32 rtw_hal_inirp_init(struct adapter *Adapter) ("===> usb_inirp_init\n")); /* issue Rx irp to receive data */ - precvbuf = (struct recv_buf *)precvpriv->precv_buf; + precvbuf = precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { if (usb_read_port(Adapter, RECV_BULK_IN_ADDR, precvbuf) == false) { RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n")); diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index e871ebbdb95a..8fa3b8193f6e 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -181,7 +181,7 @@ struct recv_priv { struct sk_buff_head free_recv_skb_queue; struct sk_buff_head rx_skb_queue; u8 *pallocated_recv_buf; - u8 *precv_buf; /* 4 alignment */ + struct recv_buf *precv_buf; /* 4 alignment */ struct __queue free_recv_buf_queue; /* For display the phy informatiom */ u8 is_signal_dbg; /* for debug */ diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 175c1aeccfe2..b87663b8e165 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -521,7 +521,7 @@ void rtw_hal_inirp_deinit(struct adapter *padapter) int i; struct recv_buf *precvbuf; - precvbuf = (struct recv_buf *)padapter->recvpriv.precv_buf; + precvbuf = padapter->recvpriv.precv_buf; DBG_88E("%s\n", __func__); |