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
c787a855
Commit
c787a855
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: Change semaphore to mutex.
Signed-off-by:
Len Brown
<
len.brown@intel.com
>
parent
5d0c288b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
drivers/acpi/ec.c
drivers/acpi/ec.c
+6
-6
No files found.
drivers/acpi/ec.c
View file @
c787a855
...
@@ -103,7 +103,7 @@ struct acpi_ec {
...
@@ -103,7 +103,7 @@ struct acpi_ec {
unsigned
long
command_addr
;
unsigned
long
command_addr
;
unsigned
long
data_addr
;
unsigned
long
data_addr
;
unsigned
long
global_lock
;
unsigned
long
global_lock
;
struct
semaphore
sem
;
struct
mutex
lock
;
atomic_t
query_pending
;
atomic_t
query_pending
;
atomic_t
leaving_burst
;
/* 0 : No, 1 : Yes, 2: abort */
atomic_t
leaving_burst
;
/* 0 : No, 1 : Yes, 2: abort */
wait_queue_head_t
wait
;
wait_queue_head_t
wait
;
...
@@ -294,7 +294,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
...
@@ -294,7 +294,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
return
-
ENODEV
;
}
}
down
(
&
ec
->
sem
);
mutex_lock
(
&
ec
->
lock
);
/* Make sure GPE is enabled before doing transaction */
/* Make sure GPE is enabled before doing transaction */
acpi_enable_gpe
(
NULL
,
ec
->
gpe_bit
,
ACPI_NOT_ISR
);
acpi_enable_gpe
(
NULL
,
ec
->
gpe_bit
,
ACPI_NOT_ISR
);
...
@@ -310,7 +310,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
...
@@ -310,7 +310,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
rdata
,
rdata_len
);
rdata
,
rdata_len
);
end:
end:
up
(
&
ec
->
sem
);
mutex_unlock
(
&
ec
->
lock
);
if
(
ec
->
global_lock
)
if
(
ec
->
global_lock
)
acpi_release_global_lock
(
glk
);
acpi_release_global_lock
(
glk
);
...
@@ -647,7 +647,7 @@ static int acpi_ec_add(struct acpi_device *device)
...
@@ -647,7 +647,7 @@ static int acpi_ec_add(struct acpi_device *device)
ec
->
handle
=
device
->
handle
;
ec
->
handle
=
device
->
handle
;
ec
->
uid
=
-
1
;
ec
->
uid
=
-
1
;
init_MUTEX
(
&
ec
->
sem
);
mutex_init
(
&
ec
->
lock
);
atomic_set
(
&
ec
->
query_pending
,
0
);
atomic_set
(
&
ec
->
query_pending
,
0
);
if
(
acpi_ec_mode
==
EC_INTR
)
{
if
(
acpi_ec_mode
==
EC_INTR
)
{
atomic_set
(
&
ec
->
leaving_burst
,
1
);
atomic_set
(
&
ec
->
leaving_burst
,
1
);
...
@@ -830,7 +830,7 @@ acpi_fake_ecdt_callback(acpi_handle handle,
...
@@ -830,7 +830,7 @@ acpi_fake_ecdt_callback(acpi_handle handle,
{
{
acpi_status
status
;
acpi_status
status
;
init_MUTEX
(
&
ec_ecdt
->
sem
);
mutex_init
(
&
ec_ecdt
->
lock
);
if
(
acpi_ec_mode
==
EC_INTR
)
{
if
(
acpi_ec_mode
==
EC_INTR
)
{
init_waitqueue_head
(
&
ec_ecdt
->
wait
);
init_waitqueue_head
(
&
ec_ecdt
->
wait
);
}
}
...
@@ -915,7 +915,7 @@ static int __init acpi_ec_get_real_ecdt(void)
...
@@ -915,7 +915,7 @@ static int __init acpi_ec_get_real_ecdt(void)
return
-
ENOMEM
;
return
-
ENOMEM
;
memset
(
ec_ecdt
,
0
,
sizeof
(
struct
acpi_ec
));
memset
(
ec_ecdt
,
0
,
sizeof
(
struct
acpi_ec
));
init_MUTEX
(
&
ec_ecdt
->
sem
);
mutex_init
(
&
ec_ecdt
->
lock
);
if
(
acpi_ec_mode
==
EC_INTR
)
{
if
(
acpi_ec_mode
==
EC_INTR
)
{
init_waitqueue_head
(
&
ec_ecdt
->
wait
);
init_waitqueue_head
(
&
ec_ecdt
->
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