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
14d21785
Commit
14d21785
authored
Apr 28, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull dock into release branch
parents
03feb052
62a6d7fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
drivers/acpi/dock.c
drivers/acpi/dock.c
+25
-0
No files found.
drivers/acpi/dock.c
View file @
14d21785
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <linux/notifier.h>
#include <linux/notifier.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/jiffies.h>
#include <linux/jiffies.h>
#include <linux/stddef.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include <acpi/acpi_drivers.h>
...
@@ -667,6 +668,23 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
...
@@ -667,6 +668,23 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
}
}
DEVICE_ATTR
(
undock
,
S_IWUSR
,
NULL
,
write_undock
);
DEVICE_ATTR
(
undock
,
S_IWUSR
,
NULL
,
write_undock
);
/*
* show_dock_uid - read method for "uid" file in sysfs
*/
static
ssize_t
show_dock_uid
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
unsigned
long
lbuf
;
acpi_status
status
=
acpi_evaluate_integer
(
dock_station
->
handle
,
"_UID"
,
NULL
,
&
lbuf
);
if
(
ACPI_FAILURE
(
status
))
{
return
0
;
}
return
snprintf
(
buf
,
PAGE_SIZE
,
"%lx
\n
"
,
lbuf
);
}
DEVICE_ATTR
(
uid
,
S_IRUGO
,
show_dock_uid
,
NULL
);
/**
/**
* dock_add - add a new dock station
* dock_add - add a new dock station
* @handle: the dock station handle
* @handle: the dock station handle
...
@@ -715,6 +733,13 @@ static int dock_add(acpi_handle handle)
...
@@ -715,6 +733,13 @@ static int dock_add(acpi_handle handle)
kfree
(
dock_station
);
kfree
(
dock_station
);
return
ret
;
return
ret
;
}
}
ret
=
device_create_file
(
&
dock_device
.
dev
,
&
dev_attr_uid
);
if
(
ret
)
{
printk
(
"Error %d adding sysfs file
\n
"
,
ret
);
platform_device_unregister
(
&
dock_device
);
kfree
(
dock_station
);
return
ret
;
}
/* Find dependent devices */
/* Find dependent devices */
acpi_walk_namespace
(
ACPI_TYPE_DEVICE
,
ACPI_ROOT_OBJECT
,
acpi_walk_namespace
(
ACPI_TYPE_DEVICE
,
ACPI_ROOT_OBJECT
,
...
...
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