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
50f19e37
Commit
50f19e37
authored
Nov 11, 2008
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugzilla-11539' into release
parents
597e4fab
4feba70a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
drivers/acpi/system.c
drivers/acpi/system.c
+17
-8
No files found.
drivers/acpi/system.c
View file @
50f19e37
...
@@ -78,9 +78,15 @@ static ssize_t acpi_table_show(struct kobject *kobj,
...
@@ -78,9 +78,15 @@ static ssize_t acpi_table_show(struct kobject *kobj,
container_of
(
bin_attr
,
struct
acpi_table_attr
,
attr
);
container_of
(
bin_attr
,
struct
acpi_table_attr
,
attr
);
struct
acpi_table_header
*
table_header
=
NULL
;
struct
acpi_table_header
*
table_header
=
NULL
;
acpi_status
status
;
acpi_status
status
;
char
name
[
ACPI_NAME_SIZE
];
if
(
strncmp
(
table_attr
->
name
,
"NULL"
,
4
))
memcpy
(
name
,
table_attr
->
name
,
ACPI_NAME_SIZE
);
else
memcpy
(
name
,
"
\0\0\0\0
"
,
4
);
status
=
status
=
acpi_get_table
(
table_attr
->
name
,
table_attr
->
instance
,
acpi_get_table
(
name
,
table_attr
->
instance
,
&
table_header
);
&
table_header
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -95,21 +101,24 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
...
@@ -95,21 +101,24 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
struct
acpi_table_header
*
header
=
NULL
;
struct
acpi_table_header
*
header
=
NULL
;
struct
acpi_table_attr
*
attr
=
NULL
;
struct
acpi_table_attr
*
attr
=
NULL
;
memcpy
(
table_attr
->
name
,
table_header
->
signature
,
ACPI_NAME_SIZE
);
if
(
table_header
->
signature
[
0
]
!=
'\0'
)
memcpy
(
table_attr
->
name
,
table_header
->
signature
,
ACPI_NAME_SIZE
);
else
memcpy
(
table_attr
->
name
,
"NULL"
,
4
);
list_for_each_entry
(
attr
,
&
acpi_table_attr_list
,
node
)
{
list_for_each_entry
(
attr
,
&
acpi_table_attr_list
,
node
)
{
if
(
!
memcmp
(
table_header
->
signature
,
attr
->
name
,
if
(
!
memcmp
(
table_attr
->
name
,
attr
->
name
,
ACPI_NAME_SIZE
))
ACPI_NAME_SIZE
))
if
(
table_attr
->
instance
<
attr
->
instance
)
if
(
table_attr
->
instance
<
attr
->
instance
)
table_attr
->
instance
=
attr
->
instance
;
table_attr
->
instance
=
attr
->
instance
;
}
}
table_attr
->
instance
++
;
table_attr
->
instance
++
;
if
(
table_attr
->
instance
>
1
||
(
table_attr
->
instance
==
1
&&
if
(
table_attr
->
instance
>
1
||
(
table_attr
->
instance
==
1
&&
!
acpi_get_table
(
table_header
->
!
acpi_get_table
signature
,
2
,
(
table_header
->
signature
,
2
,
&
header
)))
&
header
)))
sprintf
(
table_attr
->
name
+
ACPI_NAME_SIZE
,
"%d"
,
sprintf
(
table_attr
->
name
+
4
,
"%d"
,
table_attr
->
instance
);
table_attr
->
instance
);
table_attr
->
attr
.
size
=
0
;
table_attr
->
attr
.
size
=
0
;
table_attr
->
attr
.
read
=
acpi_table_show
;
table_attr
->
attr
.
read
=
acpi_table_show
;
...
...
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