Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
50c1e113
Commit
50c1e113
authored
Dec 07, 2006
by
Alexey Starikovskiy
Committed by
Len Brown
Dec 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
Signed-off-by:
Len Brown
<
len.brown@intel.com
>
parent
a86e2772
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
drivers/acpi/ec.c
drivers/acpi/ec.c
+2
-5
No files found.
drivers/acpi/ec.c
View file @
50c1e113
...
@@ -70,8 +70,6 @@ enum {
...
@@ -70,8 +70,6 @@ enum {
#define ACPI_EC_DELAY 500
/* Wait 500ms max. during EC ops */
#define ACPI_EC_DELAY 500
/* Wait 500ms max. during EC ops */
#define ACPI_EC_UDELAY_GLK 1000
/* Wait 1ms max. to get global lock */
#define ACPI_EC_UDELAY_GLK 1000
/* Wait 1ms max. to get global lock */
#define ACPI_EC_UDELAY 100
/* Poll @ 100us increments */
#define ACPI_EC_UDELAY_COUNT 1000
/* Wait 100ms max. during EC ops */
enum
{
enum
{
EC_INTR
=
1
,
/* Output buffer full */
EC_INTR
=
1
,
/* Output buffer full */
...
@@ -159,11 +157,10 @@ static int acpi_ec_check_status(struct acpi_ec *ec, u8 event)
...
@@ -159,11 +157,10 @@ static int acpi_ec_check_status(struct acpi_ec *ec, u8 event)
static
int
acpi_ec_wait
(
struct
acpi_ec
*
ec
,
u8
event
)
static
int
acpi_ec_wait
(
struct
acpi_ec
*
ec
,
u8
event
)
{
{
if
(
acpi_ec_mode
==
EC_POLL
)
{
if
(
acpi_ec_mode
==
EC_POLL
)
{
int
i
;
unsigned
long
delay
=
jiffies
+
msecs_to_jiffies
(
ACPI_EC_DELAY
)
;
for
(
i
=
0
;
i
<
ACPI_EC_UDELAY_COUNT
;
++
i
)
{
while
(
time_before
(
jiffies
,
delay
)
)
{
if
(
acpi_ec_check_status
(
ec
,
event
))
if
(
acpi_ec_check_status
(
ec
,
event
))
return
0
;
return
0
;
udelay
(
ACPI_EC_UDELAY
);
}
}
}
else
{
}
else
{
if
(
wait_event_timeout
(
ec
->
wait
,
if
(
wait_event_timeout
(
ec
->
wait
,
...
...
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