mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7921: Replace deprecated PCI function
pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Madhur Kumar <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
093280ae5d
commit
b2fe7f1463
+6
-5
@@ -276,6 +276,7 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
|
||||
struct mt76_bus_ops *bus_ops;
|
||||
struct mt792x_dev *dev;
|
||||
struct mt76_dev *mdev;
|
||||
void __iomem *regs;
|
||||
u16 cmd, chipid;
|
||||
u8 features;
|
||||
int ret;
|
||||
@@ -284,10 +285,6 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pci_read_config_word(pdev, PCI_COMMAND, &cmd);
|
||||
if (!(cmd & PCI_COMMAND_MEMORY)) {
|
||||
cmd |= PCI_COMMAND_MEMORY;
|
||||
@@ -321,11 +318,15 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
pci_set_drvdata(pdev, mdev);
|
||||
|
||||
regs = pcim_iomap_region(pdev, 0, pci_name(pdev));
|
||||
if (IS_ERR(regs))
|
||||
return PTR_ERR(regs);
|
||||
|
||||
dev = container_of(mdev, struct mt792x_dev, mt76);
|
||||
dev->fw_features = features;
|
||||
dev->hif_ops = &mt7921_pcie_ops;
|
||||
dev->irq_map = &irq_map;
|
||||
mt76_mmio_init(&dev->mt76, pcim_iomap_table(pdev)[0]);
|
||||
mt76_mmio_init(&dev->mt76, regs);
|
||||
tasklet_init(&mdev->irq_tasklet, mt792x_irq_tasklet, (unsigned long)dev);
|
||||
|
||||
dev->phy.dev = dev;
|
||||
|
||||
Reference in New Issue
Block a user