On Tue, Jul 10, 2018 at 09:33:46PM +0200, Sergio Paracuellos wrote: > Add new 'mt7621_pcie_port' struct as data for the pci controller. > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> > --- > drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c > index 4f56840..58c77bd 100644 > --- a/drivers/staging/mt7621-pci/pci-mt7621.c > +++ b/drivers/staging/mt7621-pci/pci-mt7621.c > @@ -177,6 +177,16 @@ static int pcie_link_status = 0; > #define PCI_ACCESS_WRITE_2 4 > #define PCI_ACCESS_WRITE_4 5 > > +/** > + * struct mt7621_pcie_port - PCIe port information > + * @reg_base: IO Mapped Register Base > + * @dev: Device pointer > + */ > +struct mt7621_pcie_port { > + void __iomem *reg_base; > + struct device *dev; > +}; Ok, something is really odd here. A PCI driver should not have to mess with structures like this and have to create "fake" struct pci_dev, right? Or is this code really the PCI bridge code to create PCI devices? I can't figure it out. It has a pcibios override function, which the pci core calls to set things up, and should never be in a driver, but should be in pci core code for the platform. Is that what this is? What exactly is this code supposed to be doing? thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel