Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
4548a9db
Commit
4548a9db
authored
Aug 24, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull ec into release branch
parents
de9bde9a
f9319f90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
16 deletions
+31
-16
drivers/acpi/ec.c
drivers/acpi/ec.c
+31
-16
No files found.
drivers/acpi/ec.c
View file @
4548a9db
...
@@ -696,14 +696,6 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
...
@@ -696,14 +696,6 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
return
AE_CTRL_TERMINATE
;
return
AE_CTRL_TERMINATE
;
}
}
static
void
ec_remove_handlers
(
struct
acpi_ec
*
ec
)
{
acpi_remove_address_space_handler
(
ec
->
handle
,
ACPI_ADR_SPACE_EC
,
&
acpi_ec_space_handler
);
acpi_remove_gpe_handler
(
NULL
,
ec
->
gpe
,
&
acpi_ec_gpe_handler
);
}
static
int
acpi_ec_add
(
struct
acpi_device
*
device
)
static
int
acpi_ec_add
(
struct
acpi_device
*
device
)
{
{
struct
acpi_ec
*
ec
=
NULL
;
struct
acpi_ec
*
ec
=
NULL
;
...
@@ -727,13 +719,16 @@ static int acpi_ec_add(struct acpi_device *device)
...
@@ -727,13 +719,16 @@ static int acpi_ec_add(struct acpi_device *device)
/* Check if we found the boot EC */
/* Check if we found the boot EC */
if
(
boot_ec
)
{
if
(
boot_ec
)
{
if
(
boot_ec
->
gpe
==
ec
->
gpe
)
{
if
(
boot_ec
->
gpe
==
ec
->
gpe
)
{
ec_remove_handlers
(
boot_ec
);
/* We might have incorrect info for GL at boot time */
mutex_destroy
(
&
boot_ec
->
lock
);
mutex_lock
(
&
boot_ec
->
lock
);
kfree
(
boot_ec
);
boot_ec
->
global_lock
=
ec
->
global_lock
;
first_ec
=
boot_ec
=
NULL
;
/* Copy handlers from new ec into boot ec */
}
list_splice
(
&
ec
->
list
,
&
boot_ec
->
list
);
mutex_unlock
(
&
boot_ec
->
lock
);
kfree
(
ec
);
ec
=
boot_ec
;
}
}
if
(
!
first_ec
)
}
else
first_ec
=
ec
;
first_ec
=
ec
;
ec
->
handle
=
device
->
handle
;
ec
->
handle
=
device
->
handle
;
acpi_driver_data
(
device
)
=
ec
;
acpi_driver_data
(
device
)
=
ec
;
...
@@ -762,6 +757,9 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
...
@@ -762,6 +757,9 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
if
(
ec
==
first_ec
)
if
(
ec
==
first_ec
)
first_ec
=
NULL
;
first_ec
=
NULL
;
/* Don't touch boot EC */
if
(
boot_ec
!=
ec
)
kfree
(
ec
);
return
0
;
return
0
;
}
}
...
@@ -825,6 +823,8 @@ static int acpi_ec_start(struct acpi_device *device)
...
@@ -825,6 +823,8 @@ static int acpi_ec_start(struct acpi_device *device)
if
(
!
ec
)
if
(
!
ec
)
return
-
EINVAL
;
return
-
EINVAL
;
/* Boot EC is already working */
if
(
ec
!=
boot_ec
)
ret
=
ec_install_handlers
(
ec
);
ret
=
ec_install_handlers
(
ec
);
/* EC is fully operational, allow queries */
/* EC is fully operational, allow queries */
...
@@ -835,6 +835,7 @@ static int acpi_ec_start(struct acpi_device *device)
...
@@ -835,6 +835,7 @@ static int acpi_ec_start(struct acpi_device *device)
static
int
acpi_ec_stop
(
struct
acpi_device
*
device
,
int
type
)
static
int
acpi_ec_stop
(
struct
acpi_device
*
device
,
int
type
)
{
{
acpi_status
status
;
struct
acpi_ec
*
ec
;
struct
acpi_ec
*
ec
;
if
(
!
device
)
if
(
!
device
)
...
@@ -843,7 +844,21 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
...
@@ -843,7 +844,21 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
ec
=
acpi_driver_data
(
device
);
ec
=
acpi_driver_data
(
device
);
if
(
!
ec
)
if
(
!
ec
)
return
-
EINVAL
;
return
-
EINVAL
;
ec_remove_handlers
(
ec
);
/* Don't touch boot EC */
if
(
ec
==
boot_ec
)
return
0
;
status
=
acpi_remove_address_space_handler
(
ec
->
handle
,
ACPI_ADR_SPACE_EC
,
&
acpi_ec_space_handler
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
status
=
acpi_remove_gpe_handler
(
NULL
,
ec
->
gpe
,
&
acpi_ec_gpe_handler
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
return
0
;
return
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