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
d6a40224
Commit
d6a40224
authored
Feb 16, 2014
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back earlier 'acpi-dock' material.
parents
4b49b9fe
ab62f9cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
drivers/acpi/dock.c
drivers/acpi/dock.c
+6
-7
No files found.
drivers/acpi/dock.c
View file @
d6a40224
...
@@ -609,7 +609,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
...
@@ -609,7 +609,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
static
void
dock_notify
(
struct
dock_station
*
ds
,
u32
event
)
static
void
dock_notify
(
struct
dock_station
*
ds
,
u32
event
)
{
{
acpi_handle
handle
=
ds
->
handle
;
acpi_handle
handle
=
ds
->
handle
;
struct
acpi_device
*
ad
;
struct
acpi_device
*
ad
ev
=
NULL
;
int
surprise_removal
=
0
;
int
surprise_removal
=
0
;
/*
/*
...
@@ -632,7 +632,8 @@ static void dock_notify(struct dock_station *ds, u32 event)
...
@@ -632,7 +632,8 @@ static void dock_notify(struct dock_station *ds, u32 event)
switch
(
event
)
{
switch
(
event
)
{
case
ACPI_NOTIFY_BUS_CHECK
:
case
ACPI_NOTIFY_BUS_CHECK
:
case
ACPI_NOTIFY_DEVICE_CHECK
:
case
ACPI_NOTIFY_DEVICE_CHECK
:
if
(
!
dock_in_progress
(
ds
)
&&
acpi_bus_get_device
(
handle
,
&
ad
))
{
acpi_bus_get_device
(
handle
,
&
adev
);
if
(
!
dock_in_progress
(
ds
)
&&
!
acpi_device_enumerated
(
adev
))
{
begin_dock
(
ds
);
begin_dock
(
ds
);
dock
(
ds
);
dock
(
ds
);
if
(
!
dock_present
(
ds
))
{
if
(
!
dock_present
(
ds
))
{
...
@@ -712,13 +713,11 @@ static acpi_status __init find_dock_devices(acpi_handle handle, u32 lvl,
...
@@ -712,13 +713,11 @@ static acpi_status __init find_dock_devices(acpi_handle handle, u32 lvl,
static
ssize_t
show_docked
(
struct
device
*
dev
,
static
ssize_t
show_docked
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
struct
device_attribute
*
attr
,
char
*
buf
)
{
{
struct
acpi_device
*
tmp
;
struct
dock_station
*
dock_station
=
dev
->
platform_data
;
struct
dock_station
*
dock_station
=
dev
->
platform_data
;
struct
acpi_device
*
adev
=
NULL
;
if
(
!
acpi_bus_get_device
(
dock_station
->
handle
,
&
tmp
))
acpi_bus_get_device
(
dock_station
->
handle
,
&
adev
);
return
snprintf
(
buf
,
PAGE_SIZE
,
"1
\n
"
);
return
snprintf
(
buf
,
PAGE_SIZE
,
"%u
\n
"
,
acpi_device_enumerated
(
adev
));
return
snprintf
(
buf
,
PAGE_SIZE
,
"0
\n
"
);
}
}
static
DEVICE_ATTR
(
docked
,
S_IRUGO
,
show_docked
,
NULL
);
static
DEVICE_ATTR
(
docked
,
S_IRUGO
,
show_docked
,
NULL
);
...
...
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