USB: mark "reject" field of struct urb as atomic_t
It is enough to protect accesses to reject field of urb by marking it as atomic_t,also it is the only reason of existence of usb_reject_lock,so remove the lock to make code more clean. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
3b23dd6f8a
commit
49367d8f1d
3 changed files with 9 additions and 22 deletions
|
@ -1340,7 +1340,7 @@ struct urb {
|
|||
struct kref kref; /* reference count of the URB */
|
||||
void *hcpriv; /* private data for host controller */
|
||||
atomic_t use_count; /* concurrent submissions counter */
|
||||
u8 reject; /* submissions will fail */
|
||||
atomic_t reject; /* submissions will fail */
|
||||
int unlinked; /* unlink error code */
|
||||
|
||||
/* public: documented fields in the urb that can be used by drivers */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue