mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02: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 <madhurkumar004@gmail.com> Link: https://patch.msgid.link/20251208172331.89705-1-madhurkumar004@gmail.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
0176417d10
commit
ee5bb35d2b
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user