Skip to content

Commit d9c8838

Browse files
lipengfei28xiaoxiang781216
authored andcommitted
pci: use g_pci_ctrl_list replace g_root_bus_list
Signed-off-by: lipengfei28 <[email protected]>
1 parent 75f8c72 commit d9c8838

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/pci/pci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ static struct list_node g_pci_device_list =
122122
LIST_INITIAL_VALUE(g_pci_device_list);
123123
static struct list_node g_pci_driver_list =
124124
LIST_INITIAL_VALUE(g_pci_driver_list);
125-
static struct list_node g_pci_root_buses =
126-
LIST_INITIAL_VALUE(g_pci_root_buses);
125+
static struct list_node g_pci_ctrl_list =
126+
LIST_INITIAL_VALUE(g_pci_ctrl_list);
127127

128128
/****************************************************************************
129129
* Private Functions
@@ -1189,7 +1189,7 @@ int pci_register_controller(FAR struct pci_controller_s *ctrl)
11891189
pci_register_bus_devices(bus);
11901190

11911191
nxmutex_lock(&g_pci_lock);
1192-
list_add_tail(&g_pci_root_buses, &bus->node);
1192+
list_add_tail(&g_pci_ctrl_list, &ctrl->node);
11931193
nxmutex_unlock(&g_pci_lock);
11941194

11951195
return 0;

include/nuttx/pci/pci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ struct pci_controller_s
269269
FAR const struct pci_ops_s *ops;
270270

271271
FAR struct pci_bus_s *bus;
272+
struct list_node node;
272273
uint8_t busno;
273274
};
274275

0 commit comments

Comments
 (0)