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
47ae106d
Commit
47ae106d
authored
Apr 05, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pnpacpi' into release
parents
2e33b234
6328a574
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
drivers/pnp/pnpacpi/core.c
drivers/pnp/pnpacpi/core.c
+16
-7
No files found.
drivers/pnp/pnpacpi/core.c
View file @
47ae106d
...
...
@@ -83,7 +83,6 @@ static int pnpacpi_set_resources(struct pnp_dev *dev)
acpi_handle
handle
=
dev
->
data
;
struct
acpi_buffer
buffer
;
int
ret
;
acpi_status
status
;
pnp_dbg
(
&
dev
->
dev
,
"set resources
\n
"
);
ret
=
pnpacpi_build_resource_template
(
dev
,
&
buffer
);
...
...
@@ -94,21 +93,31 @@ static int pnpacpi_set_resources(struct pnp_dev *dev)
kfree
(
buffer
.
pointer
);
return
ret
;
}
status
=
acpi_set_current_resources
(
handle
,
&
buffer
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
acpi_set_current_resources
(
handle
,
&
buffer
)))
ret
=
-
EINVAL
;
else
if
(
acpi_bus_power_manageable
(
handle
))
ret
=
acpi_bus_set_power
(
handle
,
ACPI_STATE_D0
);
kfree
(
buffer
.
pointer
);
return
ret
;
}
static
int
pnpacpi_disable_resources
(
struct
pnp_dev
*
dev
)
{
acpi_status
status
;
acpi_handle
handle
=
dev
->
data
;
int
ret
;
dev_dbg
(
&
dev
->
dev
,
"disable resources
\n
"
);
/* acpi_unregister_gsi(pnp_irq(dev, 0)); */
status
=
acpi_evaluate_object
((
acpi_handle
)
dev
->
data
,
"_DIS"
,
NULL
,
NULL
);
return
ACPI_FAILURE
(
status
)
?
-
ENODEV
:
0
;
ret
=
0
;
if
(
acpi_bus_power_manageable
(
handle
))
{
ret
=
acpi_bus_set_power
(
handle
,
ACPI_STATE_D3
);
if
(
ret
)
return
ret
;
}
if
(
ACPI_FAILURE
(
acpi_evaluate_object
(
handle
,
"_DIS"
,
NULL
,
NULL
)))
ret
=
-
ENODEV
;
return
ret
;
}
#ifdef CONFIG_ACPI_SLEEP
...
...
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