Skip to content

Commit 4793895

Browse files
committed
PCI: mt7621: Rename mt7621_pci_ to mt7621_pcie_
Rename mt7621_pci_* structs and functions to mt7621_pcie_* for consistency with the rest of the file. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Sergio Paracuellos <[email protected]> Cc: Matthias Brugger <[email protected]>
1 parent 5fe714f commit 4793895

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

drivers/pci/controller/pcie-mt7621.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ struct mt7621_pcie_port {
9393
* reset lines are inverted.
9494
*/
9595
struct mt7621_pcie {
96-
void __iomem *base;
9796
struct device *dev;
97+
void __iomem *base;
9898
struct list_head ports;
9999
bool resets_inverted;
100100
};
@@ -129,7 +129,7 @@ static inline void pcie_port_write(struct mt7621_pcie_port *port,
129129
writel_relaxed(val, port->base + reg);
130130
}
131131

132-
static inline u32 mt7621_pci_get_cfgaddr(unsigned int bus, unsigned int slot,
132+
static inline u32 mt7621_pcie_get_cfgaddr(unsigned int bus, unsigned int slot,
133133
unsigned int func, unsigned int where)
134134
{
135135
return (((where & 0xf00) >> 8) << 24) | (bus << 16) | (slot << 11) |
@@ -140,23 +140,23 @@ static void __iomem *mt7621_pcie_map_bus(struct pci_bus *bus,
140140
unsigned int devfn, int where)
141141
{
142142
struct mt7621_pcie *pcie = bus->sysdata;
143-
u32 address = mt7621_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn),
143+
u32 address = mt7621_pcie_get_cfgaddr(bus->number, PCI_SLOT(devfn),
144144
PCI_FUNC(devfn), where);
145145

146146
writel_relaxed(address, pcie->base + RALINK_PCI_CONFIG_ADDR);
147147

148148
return pcie->base + RALINK_PCI_CONFIG_DATA + (where & 3);
149149
}
150150

151-
struct pci_ops mt7621_pci_ops = {
151+
struct pci_ops mt7621_pcie_ops = {
152152
.map_bus = mt7621_pcie_map_bus,
153153
.read = pci_generic_config_read,
154154
.write = pci_generic_config_write,
155155
};
156156

157157
static u32 read_config(struct mt7621_pcie *pcie, unsigned int dev, u32 reg)
158158
{
159-
u32 address = mt7621_pci_get_cfgaddr(0, dev, 0, reg);
159+
u32 address = mt7621_pcie_get_cfgaddr(0, dev, 0, reg);
160160

161161
pcie_write(pcie, address, RALINK_PCI_CONFIG_ADDR);
162162
return pcie_read(pcie, RALINK_PCI_CONFIG_DATA);
@@ -165,7 +165,7 @@ static u32 read_config(struct mt7621_pcie *pcie, unsigned int dev, u32 reg)
165165
static void write_config(struct mt7621_pcie *pcie, unsigned int dev,
166166
u32 reg, u32 val)
167167
{
168-
u32 address = mt7621_pci_get_cfgaddr(0, dev, 0, reg);
168+
u32 address = mt7621_pcie_get_cfgaddr(0, dev, 0, reg);
169169

170170
pcie_write(pcie, address, RALINK_PCI_CONFIG_ADDR);
171171
pcie_write(pcie, val, RALINK_PCI_CONFIG_DATA);
@@ -505,16 +505,16 @@ static int mt7621_pcie_register_host(struct pci_host_bridge *host)
505505
{
506506
struct mt7621_pcie *pcie = pci_host_bridge_priv(host);
507507

508-
host->ops = &mt7621_pci_ops;
508+
host->ops = &mt7621_pcie_ops;
509509
host->sysdata = pcie;
510510
return pci_host_probe(host);
511511
}
512512

513-
static const struct soc_device_attribute mt7621_pci_quirks_match[] = {
513+
static const struct soc_device_attribute mt7621_pcie_quirks_match[] = {
514514
{ .soc_id = "mt7621", .revision = "E2" }
515515
};
516516

517-
static int mt7621_pci_probe(struct platform_device *pdev)
517+
static int mt7621_pcie_probe(struct platform_device *pdev)
518518
{
519519
struct device *dev = &pdev->dev;
520520
const struct soc_device_attribute *attr;
@@ -535,7 +535,7 @@ static int mt7621_pci_probe(struct platform_device *pdev)
535535
platform_set_drvdata(pdev, pcie);
536536
INIT_LIST_HEAD(&pcie->ports);
537537

538-
attr = soc_device_match(mt7621_pci_quirks_match);
538+
attr = soc_device_match(mt7621_pcie_quirks_match);
539539
if (attr)
540540
pcie->resets_inverted = true;
541541

@@ -572,7 +572,7 @@ static int mt7621_pci_probe(struct platform_device *pdev)
572572
return err;
573573
}
574574

575-
static int mt7621_pci_remove(struct platform_device *pdev)
575+
static int mt7621_pcie_remove(struct platform_device *pdev)
576576
{
577577
struct mt7621_pcie *pcie = platform_get_drvdata(pdev);
578578
struct mt7621_pcie_port *port;
@@ -583,18 +583,18 @@ static int mt7621_pci_remove(struct platform_device *pdev)
583583
return 0;
584584
}
585585

586-
static const struct of_device_id mt7621_pci_ids[] = {
586+
static const struct of_device_id mt7621_pcie_ids[] = {
587587
{ .compatible = "mediatek,mt7621-pci" },
588588
{},
589589
};
590-
MODULE_DEVICE_TABLE(of, mt7621_pci_ids);
590+
MODULE_DEVICE_TABLE(of, mt7621_pcie_ids);
591591

592-
static struct platform_driver mt7621_pci_driver = {
593-
.probe = mt7621_pci_probe,
594-
.remove = mt7621_pci_remove,
592+
static struct platform_driver mt7621_pcie_driver = {
593+
.probe = mt7621_pcie_probe,
594+
.remove = mt7621_pcie_remove,
595595
.driver = {
596596
.name = "mt7621-pci",
597-
.of_match_table = of_match_ptr(mt7621_pci_ids),
597+
.of_match_table = of_match_ptr(mt7621_pcie_ids),
598598
},
599599
};
600-
builtin_platform_driver(mt7621_pci_driver);
600+
builtin_platform_driver(mt7621_pcie_driver);

0 commit comments

Comments
 (0)