Re: [staging-media-next 10/11] easycap: drop usb_class_driver

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

 



On Wed, Nov 09, 2011 at 02:26:41PM +0200, Tomas Winkler wrote:
> Drop usb_class_driver and collaterals as it is not used
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> ---
>  drivers/staging/media/easycap/easycap.h      |    1 -
>  drivers/staging/media/easycap/easycap_main.c |   25 +------------------------
>  2 files changed, 1 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/staging/media/easycap/easycap.h b/drivers/staging/media/easycap/easycap.h
> index b0e54f78..a007e74 100644
> --- a/drivers/staging/media/easycap/easycap.h
> +++ b/drivers/staging/media/easycap/easycap.h
> @@ -98,7 +98,6 @@
>  #define EASYCAP_DRIVER_VERSION "0.9.01"
>  #define EASYCAP_DRIVER_DESCRIPTION "easycapdc60"
>  
> -#define USB_SKEL_MINOR_BASE     192
>  #define DONGLE_MANY 8
>  #define INPUT_MANY 6
>  /*---------------------------------------------------------------------------*/
> diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c
> index ce23beb..525a6b6 100644
> --- a/drivers/staging/media/easycap/easycap_main.c
> +++ b/drivers/staging/media/easycap/easycap_main.c
> @@ -113,16 +113,6 @@ const char *strerror(int err)
>  #undef ERRNOSTR
>  }
>  
> -/*---------------------------------------------------------------------------*/
> -/*
> - *  PARAMETERS USED WHEN REGISTERING THE VIDEO INTERFACE
> - *
> - *  NOTE: SOME KERNELS IGNORE usb_class_driver.minor_base, AS MENTIONED BY
> - *        CORBET ET AL. "LINUX DEVICE DRIVERS", 3rd EDITION, PAGE 253.
> - *        THIS IS THE CASE FOR OpenSUSE.
> - */
> -/*---------------------------------------------------------------------------*/
> -/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
>  /****************************************************************************/
>  /*---------------------------------------------------------------------------*/
>  /*
> @@ -2856,20 +2846,7 @@ static void easycap_complete(struct urb *purb)
>  	}
>  	return;
>  }
> -static const struct file_operations easycap_fops = {
> -	.owner		= THIS_MODULE,
> -	.open		= easycap_open,
> -	.unlocked_ioctl	= easycap_unlocked_ioctl,
> -	.poll		= easycap_poll,
> -	.mmap		= easycap_mmap,
> -	.llseek		= no_llseek,
> -};
> -static const struct usb_class_driver easycap_class = {
> -	.name = "usb/easycap%d",
> -	.fops = &easycap_fops,
> -	.minor_base = USB_SKEL_MINOR_BASE,
> -};
> -/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
> +
>  static const struct v4l2_file_operations v4l2_fops = {
>  	.owner		= THIS_MODULE,
>  	.open		= easycap_open_noinode,
> -- 
> 1.7.4.4
> 
> _______________________________________________

If you have dropped file_operations then easycap_open_noinode is
completely useless, you can just change easycap_open to receive
just struct file*.

I would send a patch, but I don't know if I have to base it
on this patches or on a fresh staging-next tree.

Plus, I was fooling around with my easycap device and I got a kernel
Ooops. Any suggestions/links on how to debug this kind of failure?

Thanks,
Ezequiel.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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