lkml.org 
[lkml]   [2015]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 10/28] PCI: Save sysdata in pci_host_bridge drvdata
    Date
    On Friday 16 January 2015 09:44:08 Yijing Wang wrote:
    > @@ -2066,11 +2064,11 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, u32 db,
    > {
    > struct pci_host_bridge *host;
    >
    > - host = pci_create_host_bridge(parent, db, resources);
    > + host = pci_create_host_bridge(parent, db, resources, sysdata);
    > if (!host)
    > return NULL;
    >
    > - return __pci_scan_root_bus(host, ops, sysdata);
    > + return __pci_scan_root_bus(host, ops);
    > }
    > EXPORT_SYMBOL(pci_scan_root_bus);
    >

    How about keeping the sysdata out of the pci_create_host_bridge interface, and
    refactoring it so that the call sequence becomes

    host = pci_create_host_bridge(parent, db, resources);
    host->sysdata = sysdata;
    __pci_scan_root_bus(host, ops);

    This way, we can make sysdata completely option. I assume that more of the
    fields we have in sysdata today can get moved into pci_host_bridge
    over time, so a host bridge driver can just assign those members individually
    between pci_create_host_bridge and __pci_scan_root_bus.

    Arnd


    \
     
     \ /
      Last update: 2015-01-16 10:41    [W:2.126 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site