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
Kirill Smelkov
linux
Commits
a715632e
Commit
a715632e
authored
May 18, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: remove usb_uninterruptible_sleep_ms() now that we have msleep()
parent
fee7e3ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
20 deletions
+7
-20
drivers/usb/core/hub.c
drivers/usb/core/hub.c
+7
-7
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+0
-11
include/linux/usb.h
include/linux/usb.h
+0
-2
No files found.
drivers/usb/core/hub.c
View file @
a715632e
...
...
@@ -381,7 +381,7 @@ static void hub_power_on(struct usb_hub *hub)
}
/* Wait for power to be enabled */
usb_uninterruptible_sleep_ms
(
hub
->
descriptor
->
bPwrOn2PwrGood
*
2
);
msleep
(
hub
->
descriptor
->
bPwrOn2PwrGood
*
2
);
}
static
int
hub_hub_status
(
struct
usb_hub
*
hub
,
...
...
@@ -887,7 +887,7 @@ static int hub_port_wait_reset(struct usb_device *hub, int port,
delay_time
<
HUB_RESET_TIMEOUT
;
delay_time
+=
delay
)
{
/* wait to give the device a chance to reset */
usb_uninterruptible_sleep_ms
(
delay
);
msleep
(
delay
);
/* read and decode port status */
ret
=
hub_port_status
(
hub
,
port
,
&
portstatus
,
&
portchange
);
...
...
@@ -1002,7 +1002,7 @@ static int hub_port_debounce(struct usb_device *hub, int port)
connection
=
0
;
stable_count
=
0
;
for
(
delay_time
=
0
;
delay_time
<
HUB_DEBOUNCE_TIMEOUT
;
delay_time
+=
HUB_DEBOUNCE_STEP
)
{
usb_uninterruptible_sleep_ms
(
HUB_DEBOUNCE_STEP
);
msleep
(
HUB_DEBOUNCE_STEP
);
ret
=
hub_port_status
(
hub
,
port
,
&
portstatus
,
&
portchange
);
if
(
ret
<
0
)
...
...
@@ -1146,7 +1146,7 @@ hub_port_init (struct usb_device *hub, struct usb_device *dev, int port)
retval
=
usb_set_address
(
dev
);
if
(
retval
>=
0
)
break
;
usb_uninterruptible_sleep_ms
(
200
);
msleep
(
200
);
}
if
(
retval
<
0
)
{
dev_err
(
&
dev
->
dev
,
...
...
@@ -1165,11 +1165,11 @@ hub_port_init (struct usb_device *hub, struct usb_device *dev, int port)
* - let SET_ADDRESS settle, some device hardware wants it
* - read ep0 maxpacket even for high and low speed,
*/
usb_uninterruptible_sleep_ms
(
10
);
msleep
(
10
);
retval
=
usb_get_device_descriptor
(
dev
,
8
);
if
(
retval
>=
8
)
break
;
usb_uninterruptible_sleep_ms
(
100
);
msleep
(
100
);
}
if
(
retval
!=
8
)
{
dev_err
(
&
dev
->
dev
,
"device descriptor read/%s, error %d
\n
"
,
...
...
@@ -1515,7 +1515,7 @@ static void hub_events(void)
}
if
(
hubchange
&
HUB_CHANGE_OVERCURRENT
)
{
dev_dbg
(
&
hub
->
intf
->
dev
,
"overcurrent change
\n
"
);
usb_uninterruptible_sleep_ms
(
500
);
/* Cool down */
msleep
(
500
);
/* Cool down */
clear_hub_feature
(
dev
,
C_HUB_OVER_CURRENT
);
hub_power_on
(
hub
);
}
...
...
drivers/usb/core/usb.c
View file @
a715632e
...
...
@@ -1483,16 +1483,6 @@ static int usb_device_resume(struct device *dev)
return
0
;
}
void
usb_uninterruptible_sleep_ms
(
int
msecs
)
{
long
timeout
=
msecs_to_jiffies
(
msecs
);
while
(
timeout
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
timeout
=
schedule_timeout
(
timeout
);
}
}
struct
bus_type
usb_bus_type
=
{
.
name
=
"usb"
,
.
match
=
usb_device_match
,
...
...
@@ -1610,7 +1600,6 @@ EXPORT_SYMBOL(usb_reset_device);
EXPORT_SYMBOL
(
usb_disconnect
);
EXPORT_SYMBOL
(
__usb_get_extra_descriptor
);
EXPORT_SYMBOL
(
usb_uninterruptible_sleep_ms
);
EXPORT_SYMBOL
(
usb_find_device
);
EXPORT_SYMBOL
(
usb_get_current_frame_number
);
...
...
include/linux/usb.h
View file @
a715632e
...
...
@@ -31,8 +31,6 @@ static __inline__ void wait_ms(unsigned int ms)
mdelay
(
ms
);
}
void
usb_uninterruptible_sleep_ms
(
int
msecs
);
struct
usb_device
;
struct
usb_driver
;
...
...
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