The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=cf899348420ce8839e32ddc30247b5d1c2b384f4

commit cf899348420ce8839e32ddc30247b5d1c2b384f4
Author:     Bjoern A. Zeeb <b...@freebsd.org>
AuthorDate: 2021-10-25 17:15:01 +0000
Commit:     Bjoern A. Zeeb <b...@freebsd.org>
CommitDate: 2021-10-25 20:19:24 +0000

    LinuxKPI: pci.h / linux_pci.c rename pci_driver field
    
    Rename the struct pci_driver {} field got the list_head from links
    to node as a driver is actually initialsing this to {} which seems
    questionable but it will at least make us match the Linux structure
    field name.
    
    MFC after:      3 days
    Reviewed by:    manu, hselasky
    Differential Revision: https://reviews.freebsd.org/D32645
---
 sys/compat/linuxkpi/common/include/linux/pci.h | 2 +-
 sys/compat/linuxkpi/common/src/linux_pci.c     | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h 
b/sys/compat/linuxkpi/common/include/linux/pci.h
index 5903a402c52e..1b4f55c2a2e5 100644
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -193,7 +193,7 @@ typedef int pci_power_t;
 struct pci_dev;
 
 struct pci_driver {
-       struct list_head                links;
+       struct list_head                node;
        char                            *name;
        const struct pci_device_id              *id_table;
        int  (*probe)(struct pci_dev *dev, const struct pci_device_id *id);
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c 
b/sys/compat/linuxkpi/common/src/linux_pci.c
index 780ba38d18dd..db94bc08239e 100644
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -242,7 +242,7 @@ linux_pci_find(device_t dev, const struct pci_device_id 
**idp)
        subdevice = pci_get_subdevice(dev);
 
        spin_lock(&pci_lock);
-       list_for_each_entry(pdrv, &pci_drivers, links) {
+       list_for_each_entry(pdrv, &pci_drivers, node) {
                for (id = pdrv->id_table; id->vendor != 0; id++) {
                        if (vendor == id->vendor &&
                            (PCI_ANY_ID == id->device || device == id->device) 
&&
@@ -640,7 +640,7 @@ _linux_pci_register_driver(struct pci_driver *pdrv, 
devclass_t dc)
 
        linux_set_current(curthread);
        spin_lock(&pci_lock);
-       list_add(&pdrv->links, &pci_drivers);
+       list_add(&pdrv->node, &pci_drivers);
        spin_unlock(&pci_lock);
        pdrv->bsddriver.name = pdrv->name;
        pdrv->bsddriver.methods = pci_methods;
@@ -734,7 +734,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv)
        bus = devclass_find("pci");
 
        spin_lock(&pci_lock);
-       list_del(&pdrv->links);
+       list_del(&pdrv->node);
        spin_unlock(&pci_lock);
        mtx_lock(&Giant);
        if (bus != NULL)
@@ -750,7 +750,7 @@ linux_pci_unregister_drm_driver(struct pci_driver *pdrv)
        bus = devclass_find("vgapci");
 
        spin_lock(&pci_lock);
-       list_del(&pdrv->links);
+       list_del(&pdrv->node);
        spin_unlock(&pci_lock);
        mtx_lock(&Giant);
        if (bus != NULL)

Reply via email to