Skip to content

Commit 9db8b24

Browse files
committed
Merge tag 'x86_platform_for_v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform cleanup from Borislav Petkov: - Replace deprecated PCI functions used in intel-mid * tag 'x86_platform_for_v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/intel-mid: Replace deprecated PCI functions
2 parents ab713e7 + 90f1b42 commit 9db8b24

File tree

1 file changed

+7
-7
lines changed
  • arch/x86/platform/intel-mid

1 file changed

+7
-7
lines changed

arch/x86/platform/intel-mid/pwr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,18 +358,18 @@ static int mid_pwr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
358358
return ret;
359359
}
360360

361-
ret = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev));
362-
if (ret) {
363-
dev_err(&pdev->dev, "I/O memory remapping failed\n");
364-
return ret;
365-
}
366-
367361
pwr = devm_kzalloc(dev, sizeof(*pwr), GFP_KERNEL);
368362
if (!pwr)
369363
return -ENOMEM;
370364

365+
pwr->regs = pcim_iomap_region(pdev, 0, "intel_mid_pwr");
366+
ret = PTR_ERR_OR_ZERO(pwr->regs);
367+
if (ret) {
368+
dev_err(&pdev->dev, "Could not request / ioremap I/O-Mem: %d\n", ret);
369+
return ret;
370+
}
371+
371372
pwr->dev = dev;
372-
pwr->regs = pcim_iomap_table(pdev)[0];
373373
pwr->irq = pdev->irq;
374374

375375
mutex_init(&pwr->lock);

0 commit comments

Comments
 (0)