From d9c8838319e3e2850f82162a1387ba709c2e62d8 Mon Sep 17 00:00:00 2001 From: lipengfei28 Date: Fri, 31 May 2024 16:36:29 +0800 Subject: [PATCH] pci: use g_pci_ctrl_list replace g_root_bus_list Signed-off-by: lipengfei28 --- drivers/pci/pci.c | 6 +++--- include/nuttx/pci/pci.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 35b4ac0056..f1ae5df529 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -122,8 +122,8 @@ static struct list_node g_pci_device_list = LIST_INITIAL_VALUE(g_pci_device_list); static struct list_node g_pci_driver_list = LIST_INITIAL_VALUE(g_pci_driver_list); -static struct list_node g_pci_root_buses = - LIST_INITIAL_VALUE(g_pci_root_buses); +static struct list_node g_pci_ctrl_list = + LIST_INITIAL_VALUE(g_pci_ctrl_list); /**************************************************************************** * Private Functions @@ -1189,7 +1189,7 @@ int pci_register_controller(FAR struct pci_controller_s *ctrl) pci_register_bus_devices(bus); nxmutex_lock(&g_pci_lock); - list_add_tail(&g_pci_root_buses, &bus->node); + list_add_tail(&g_pci_ctrl_list, &ctrl->node); nxmutex_unlock(&g_pci_lock); return 0; diff --git a/include/nuttx/pci/pci.h b/include/nuttx/pci/pci.h index f6835e8c81..2f1db1eebd 100644 --- a/include/nuttx/pci/pci.h +++ b/include/nuttx/pci/pci.h @@ -269,6 +269,7 @@ struct pci_controller_s FAR const struct pci_ops_s *ops; FAR struct pci_bus_s *bus; + struct list_node node; uint8_t busno; };