Re: [PATCH] staging: usbip: claim ports used by shared devices

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

 



On Tue, 4 Mar 2014, Valentina Manea wrote:

> diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
> index 90e18f6..a91dc1f 100644
> --- a/drivers/usb/core/devio.c
> +++ b/drivers/usb/core/devio.c
> @@ -62,23 +62,6 @@
>  /* Mutual exclusion for removal, open, and release */
>  DEFINE_MUTEX(usbfs_mutex);
>  
> -struct dev_state {
> -	struct list_head list;      /* state list */
> -	struct usb_device *dev;
> -	struct file *file;
> -	spinlock_t lock;            /* protects the async urb lists */
> -	struct list_head async_pending;
> -	struct list_head async_completed;
> -	wait_queue_head_t wait;     /* wake up if a request completed */
> -	unsigned int discsignr;
> -	struct pid *disc_pid;
> -	const struct cred *cred;
> -	void __user *disccontext;
> -	unsigned long ifclaimed;
> -	u32 secid;
> -	u32 disabled_bulk_eps;
> -};
> -

Don't remove this definition.

> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 22de4af..e0843a4 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -366,6 +366,24 @@ struct usb_bus {
>  #endif
>  };
>  
> +struct dev_state {
> +	struct list_head list;      /* state list */
> +	struct usb_device *dev;
> +	struct file *file;
> +	spinlock_t lock;            /* protects the async urb lists */
> +	struct list_head async_pending;
> +	struct list_head async_completed;
> +	wait_queue_head_t wait;     /* wake up if a request completed */
> +	unsigned int discsignr;
> +	struct pid *disc_pid;
> +	const struct cred *cred;
> +	void __user *disccontext;
> +	unsigned long ifclaimed;
> +	u32 secid;
> +	u32 disabled_bulk_eps;
> +};

And don't put this here.  Instead, just put

struct dev_state;

Alan Stern

_______________________________________________
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