You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/06 02:01:22 UTC
(nuttx) 05/13: pci: use g_pci_ctrl_list replace g_root_bus_list
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d9c8838319e3e2850f82162a1387ba709c2e62d8
Author: lipengfei28 <li...@xiaomi.com>
AuthorDate: Fri May 31 16:36:29 2024 +0800
pci: use g_pci_ctrl_list replace g_root_bus_list
Signed-off-by: lipengfei28 <li...@xiaomi.com>
---
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;
};