Re: [PATCH 1/4] staging: rtl8188eu: os_intfs.c

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

 



Your subject does not say what is going on in this patch, only the file
being modified :(


On Fri, Aug 22, 2014 at 11:32:38AM +0100, Miguel Oliveira wrote:
> void rtw_proc_remove_one(struct net_device *dev)
> {
> }
> void rtw_proc_init_one(struct net_device *dev)
>   /* TODO: Convert these to /sys */
> 
> Converting the above from proc into debugfs.
> Convert all rtw_proc_xxx references to rtw_sys_xxx

I don't understand, what exactly are you doing here?

Are you moving stuff to debugfs or to sysfs?  And what exactly are you
moving?  And why?  And if sysfs, you need to document the files.

> 
> Signed-off-by: Miguel Oliveira <cmroliv@xxxxxxxxx>
> ---
>  drivers/staging/rtl8188eu/os_dep/os_intfs.c |  517 +++++++++++++++++----------
>  1 file changed, 326 insertions(+), 191 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
> index c7a44ab..49b441a 100644
> --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
> @@ -29,6 +29,8 @@
>  
>  #include <usb_hal.h>
>  
> +#include <linux/debugfs.h>
> +
>  MODULE_LICENSE("GPL");
>  MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
>  MODULE_AUTHOR("Realtek Semiconductor Corp.");
> @@ -166,50 +168,254 @@ MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P")
>  module_param_named(debug, rtw_debug, int, 0444);
>  MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)");
>  
> -/* dummy routines */
> -void rtw_proc_remove_one(struct net_device *dev)
> -{
> -}
> +static const struct file_operations drv_version = {
> +	.owner =	THIS_MODULE,
> +	.read =		sys_get_drv_version,
> +	.llseek =	default_llseek,
> +};

<snip>

You do know that debugfs can handle single variables very easily, with
no need for a file_operations structure, right?  Are you sure you need
all of these new structures?

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