Re: [PATCH RESEND 12/12] staging: wilc1000: add argument wilc and use it instead of g_linux_wlan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 29, 2015 at 12:18:52PM +0900, Glen Lee wrote:
> This patch adds new argument wilc to linux_sdio_cmd53 and linux_sdio_cmd52
> , and use it instead of g_linux_wlan. Pass wilc to the functions as well.
> The void type wilc will be changed with struct wilc when SDIO and SPI
> modules are reworked.
> 
> Signed-off-by: Glen Lee <glen.lee@xxxxxxxxx>
> ---
>  drivers/staging/wilc1000/linux_wlan_sdio.c |  8 ++--
>  drivers/staging/wilc1000/linux_wlan_sdio.h |  4 +-
>  drivers/staging/wilc1000/wilc_sdio.c       | 66 +++++++++++++++---------------
>  drivers/staging/wilc1000/wilc_wlan_if.h    |  4 +-
>  4 files changed, 41 insertions(+), 41 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c b/drivers/staging/wilc1000/linux_wlan_sdio.c
> index bf05e22..8150d6f 100644
> --- a/drivers/staging/wilc1000/linux_wlan_sdio.c
> +++ b/drivers/staging/wilc1000/linux_wlan_sdio.c
> @@ -53,9 +53,9 @@ static void wilc_sdio_interrupt(struct sdio_func *func)
>  }
>  
>  
> -int linux_sdio_cmd52(sdio_cmd52_t *cmd)
> +int linux_sdio_cmd52(void *wilc, sdio_cmd52_t *cmd)

Again, why a void *?  Please use the correct type, you know what it is,
that way you can get rid of horrid stuff like this:

>  {
> -	struct sdio_func *func = g_linux_wlan->wilc_sdio_func;
> +	struct sdio_func *func = ((struct wilc*)wilc)->wilc_sdio_func;

All of those casts should not be needed.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux