mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
staging: ks7010: remove void * cast
Functions accept a parameter of type 'void *', this is then cast to a struct ks_wlan_private pointer. All call sites have a struct ks_wlan_private pointer and cast it to 'void *'. We can remove the unnecessary casting by changing the parameter type to match the usage. Functions changed all have internal linkage. Replace parameter of type 'void *' with 'struct ks_wlan_private *'. Remove unnecessary casting to and from 'void *'. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ed246b9ecc
commit
5141e9c634
1 changed files with 8 additions and 12 deletions
|
@ -306,9 +306,8 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tx_device_task(void *dev)
|
static void tx_device_task(struct ks_wlan_private *priv)
|
||||||
{
|
{
|
||||||
struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
|
|
||||||
struct tx_device_buffer *sp;
|
struct tx_device_buffer *sp;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
@ -386,9 +385,8 @@ static void rx_event_task(unsigned long dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ks_wlan_hw_rx(void *dev, uint16_t size)
|
static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
|
||||||
{
|
{
|
||||||
struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
|
|
||||||
int retval;
|
int retval;
|
||||||
struct rx_device_buffer *rx_buffer;
|
struct rx_device_buffer *rx_buffer;
|
||||||
struct hostif_hdr *hdr;
|
struct hostif_hdr *hdr;
|
||||||
|
@ -520,11 +518,10 @@ static void ks7010_rw_function(struct work_struct *work)
|
||||||
DPRINTK(4, "WSTATUS_RSIZE=%02X\n", rw_data);
|
DPRINTK(4, "WSTATUS_RSIZE=%02X\n", rw_data);
|
||||||
|
|
||||||
if (rw_data & RSIZE_MASK) { /* Read schedule */
|
if (rw_data & RSIZE_MASK) { /* Read schedule */
|
||||||
ks_wlan_hw_rx((void *)priv,
|
ks_wlan_hw_rx(priv, (uint16_t)((rw_data & RSIZE_MASK) << 4));
|
||||||
(uint16_t)((rw_data & RSIZE_MASK) << 4));
|
|
||||||
}
|
}
|
||||||
if ((rw_data & WSTATUS_MASK))
|
if ((rw_data & WSTATUS_MASK))
|
||||||
tx_device_task((void *)priv);
|
tx_device_task(priv);
|
||||||
|
|
||||||
_ks_wlan_hw_power_save(priv);
|
_ks_wlan_hw_power_save(priv);
|
||||||
|
|
||||||
|
@ -591,10 +588,9 @@ static void ks_sdio_interrupt(struct sdio_func *func)
|
||||||
}
|
}
|
||||||
DPRINTK(4, "WSTATUS_RSIZE=%02X\n", rw_data);
|
DPRINTK(4, "WSTATUS_RSIZE=%02X\n", rw_data);
|
||||||
rsize = rw_data & RSIZE_MASK;
|
rsize = rw_data & RSIZE_MASK;
|
||||||
if (rsize != 0) { /* Read schedule */
|
if (rsize != 0) /* Read schedule */
|
||||||
ks_wlan_hw_rx((void *)priv,
|
ks_wlan_hw_rx(priv, (uint16_t)(rsize << 4));
|
||||||
(uint16_t)(rsize << 4));
|
|
||||||
}
|
|
||||||
if (rw_data & WSTATUS_MASK) {
|
if (rw_data & WSTATUS_MASK) {
|
||||||
if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
|
if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
|
||||||
if (cnt_txqbody(priv)) {
|
if (cnt_txqbody(priv)) {
|
||||||
|
@ -607,7 +603,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tx_device_task((void *)priv);
|
tx_device_task(priv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (rsize);
|
} while (rsize);
|
||||||
|
|
Loading…
Reference in a new issue