Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5e231b6b
Commit
5e231b6b
authored
Jan 26, 2004
by
Arjan van de Ven
Committed by
Greg Kroah-Hartman
Jan 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] usb: remove some sleep_on's
sleep_on must die.... and it fixes a few races too ;)
parent
e82e16d3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
drivers/usb/media/dabusb.c
drivers/usb/media/dabusb.c
+10
-2
drivers/usb/misc/auerswald.c
drivers/usb/misc/auerswald.c
+2
-2
drivers/usb/misc/tiglusb.c
drivers/usb/misc/tiglusb.c
+9
-1
No files found.
drivers/usb/media/dabusb.c
View file @
5e231b6b
...
...
@@ -781,17 +781,25 @@ static int dabusb_probe (struct usb_interface *intf,
static
void
dabusb_disconnect
(
struct
usb_interface
*
intf
)
{
wait_queue_t
__wait
;
pdabusb_t
s
=
usb_get_intfdata
(
intf
);
dbg
(
"dabusb_disconnect"
);
init_waitqueue_entry
(
&
__wait
,
current
);
usb_set_intfdata
(
intf
,
NULL
);
if
(
s
)
{
usb_deregister_dev
(
intf
,
&
dabusb_class
);
s
->
remove_pending
=
1
;
wake_up
(
&
s
->
wait
);
add_wait_queue
(
&
s
->
remove_ok
,
&
__wait
);
set_current_state
(
TASK_UNINTERRUPTIBLE
);
if
(
s
->
state
==
_started
)
sleep_on
(
&
s
->
remove_ok
);
schedule
();
current
->
state
=
TASK_RUNNING
;
remove_wait_queue
(
&
s
->
remove_ok
,
&
__wait
);
s
->
usbdev
=
NULL
;
s
->
overruns
=
0
;
}
...
...
drivers/usb/misc/auerswald.c
View file @
5e231b6b
...
...
@@ -1927,7 +1927,6 @@ static int auerswald_probe (struct usb_interface *intf,
{
struct
usb_device
*
usbdev
=
interface_to_usbdev
(
intf
);
pauerswald_t
cp
=
NULL
;
DECLARE_WAIT_QUEUE_HEAD
(
wqh
);
unsigned
int
u
=
0
;
char
*
pbuf
;
int
ret
;
...
...
@@ -1975,7 +1974,8 @@ static int auerswald_probe (struct usb_interface *intf,
dbg
(
"Version is %X"
,
cp
->
version
);
/* allow some time to settle the device */
sleep_on_timeout
(
&
wqh
,
HZ
/
3
);
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
3
);
/* Try to get a suitable textual description of the device */
/* Device name:*/
...
...
drivers/usb/misc/tiglusb.c
View file @
5e231b6b
...
...
@@ -397,8 +397,12 @@ tiglusb_probe (struct usb_interface *intf,
static
void
tiglusb_disconnect
(
struct
usb_interface
*
intf
)
{
wait_queue_t
__wait
;
ptiglusb_t
s
=
usb_get_intfdata
(
intf
);
init_waitqueue_entry
(
&
__wait
,
current
);
usb_set_intfdata
(
intf
,
NULL
);
if
(
!
s
||
!
s
->
dev
)
{
info
(
"bogus disconnect"
);
...
...
@@ -407,8 +411,12 @@ tiglusb_disconnect (struct usb_interface *intf)
s
->
remove_pending
=
1
;
wake_up
(
&
s
->
wait
);
add_wait_queue
(
&
s
->
wait
,
&
__wait
);
set_current_state
(
TASK_UNINTERRUPTIBLE
);
if
(
s
->
state
==
_started
)
sleep_on
(
&
s
->
remove_ok
);
schedule
();
current
->
state
=
TASK_RUNNING
;
remove_wait_queue
(
&
s
->
wait
,
&
__wait
);
down
(
&
s
->
mutex
);
s
->
dev
=
NULL
;
s
->
opened
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment