hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/bcma/host_pci.c
....@@ -196,6 +196,8 @@
196196 goto err_pci_release_regions;
197197 }
198198
199
+ bus->dev = &dev->dev;
200
+
199201 /* Map MMIO */
200202 err = -ENOMEM;
201203 bus->mmio = pci_iomap(dev, 0, ~0UL);
....@@ -258,8 +260,7 @@
258260 #ifdef CONFIG_PM_SLEEP
259261 static int bcma_host_pci_suspend(struct device *dev)
260262 {
261
- struct pci_dev *pdev = to_pci_dev(dev);
262
- struct bcma_bus *bus = pci_get_drvdata(pdev);
263
+ struct bcma_bus *bus = dev_get_drvdata(dev);
263264
264265 bus->mapped_core = NULL;
265266
....@@ -268,8 +269,7 @@
268269
269270 static int bcma_host_pci_resume(struct device *dev)
270271 {
271
- struct pci_dev *pdev = to_pci_dev(dev);
272
- struct bcma_bus *bus = pci_get_drvdata(pdev);
272
+ struct bcma_bus *bus = dev_get_drvdata(dev);
273273
274274 return bcma_bus_resume(bus);
275275 }