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
bf978a83
Commit
bf978a83
authored
Mar 18, 2022
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back ACPI device enumeration material for v5.18.
parents
462ccc35
ad2f3b08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
drivers/acpi/internal.h
drivers/acpi/internal.h
+0
-2
drivers/acpi/scan.c
drivers/acpi/scan.c
+3
-2
No files found.
drivers/acpi/internal.h
View file @
bf978a83
...
...
@@ -96,8 +96,6 @@ void acpi_scan_table_notify(void);
extern
struct
list_head
acpi_bus_id_list
;
#define ACPI_MAX_DEVICE_INSTANCES 4096
struct
acpi_device_bus_id
{
const
char
*
bus_id
;
struct
ida
instance_ida
;
...
...
drivers/acpi/scan.c
View file @
bf978a83
...
...
@@ -477,7 +477,8 @@ static void acpi_device_del(struct acpi_device *device)
list_for_each_entry
(
acpi_device_bus_id
,
&
acpi_bus_id_list
,
node
)
if
(
!
strcmp
(
acpi_device_bus_id
->
bus_id
,
acpi_device_hid
(
device
)))
{
ida_simple_remove
(
&
acpi_device_bus_id
->
instance_ida
,
device
->
pnp
.
instance_no
);
ida_free
(
&
acpi_device_bus_id
->
instance_ida
,
device
->
pnp
.
instance_no
);
if
(
ida_is_empty
(
&
acpi_device_bus_id
->
instance_ida
))
{
list_del
(
&
acpi_device_bus_id
->
node
);
kfree_const
(
acpi_device_bus_id
->
bus_id
);
...
...
@@ -642,7 +643,7 @@ static int acpi_device_set_name(struct acpi_device *device,
struct
ida
*
instance_ida
=
&
acpi_device_bus_id
->
instance_ida
;
int
result
;
result
=
ida_
simple_get
(
instance_ida
,
0
,
ACPI_MAX_DEVICE_INSTANCES
,
GFP_KERNEL
);
result
=
ida_
alloc
(
instance_ida
,
GFP_KERNEL
);
if
(
result
<
0
)
return
result
;
...
...
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