lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: usbip: claim ports used by shared devices
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



\
 
 \ /
  Last update: 2014-03-04 21:21    [W:0.092 / U:3.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site