]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bcma: change IRQ control function to accept bus as an argument
authorRafał Miłecki <zajec5@gmail.com>
Sun, 8 Feb 2015 16:11:48 +0000 (17:11 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 2 Mar 2015 14:59:45 +0000 (16:59 +0200)
It doesn't operate on PCI core, but PCI host device, so there is no
point of passing core related struct.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/bcma/driver_pci.c
drivers/net/wireless/b43/main.c
drivers/net/wireless/brcm80211/brcmsmac/main.c
include/linux/bcma/bcma_driver_pci.h

index cf92bfa7eae0559b753bb3e40cc0013924b7b4a0..cfd35bc1c5a35752a1ac30f751cce6dcd544a864 100644 (file)
@@ -282,21 +282,21 @@ void bcma_core_pci_power_save(struct bcma_bus *bus, bool up)
 }
 EXPORT_SYMBOL_GPL(bcma_core_pci_power_save);
 
-int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
+int bcma_core_pci_irq_ctl(struct bcma_bus *bus, struct bcma_device *core,
                          bool enable)
 {
        struct pci_dev *pdev;
        u32 coremask, tmp;
        int err = 0;
 
-       if (!pc || core->bus->hosttype != BCMA_HOSTTYPE_PCI) {
+       if (bus->hosttype != BCMA_HOSTTYPE_PCI) {
                /* This bcma device is not on a PCI host-bus. So the IRQs are
                 * not routed through the PCI core.
                 * So we must not enable routing through the PCI core. */
                goto out;
        }
 
-       pdev = pc->core->bus->host_pci;
+       pdev = bus->host_pci;
 
        err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
        if (err)
index 34065a6f7725a1093c1a9480c9fe2acb2112f304..f34aa67f3179324c1a97a7a6384b22855b5b3581 100644 (file)
@@ -4866,7 +4866,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
        switch (dev->dev->bus_type) {
 #ifdef CONFIG_B43_BCMA
        case B43_BUS_BCMA:
-               bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci[0],
+               bcma_core_pci_irq_ctl(dev->dev->bdev->bus,
                                      dev->dev->bdev, true);
                bcma_host_pci_up(dev->dev->bdev->bus);
                break;
index bcbfc6e467e493fadf8f7e4260d6c0271d9703d3..c84af1dfc88fdde21df4c384a82e849ba827464a 100644 (file)
@@ -4959,7 +4959,7 @@ static int brcms_b_up_prep(struct brcms_hardware *wlc_hw)
         * Configure pci/pcmcia here instead of in brcms_c_attach()
         * to allow mfg hotswap:  down, hotswap (chip power cycle), up.
         */
-       bcma_core_pci_irq_ctl(&wlc_hw->d11core->bus->drv_pci[0], wlc_hw->d11core,
+       bcma_core_pci_irq_ctl(wlc_hw->d11core->bus, wlc_hw->d11core,
                              true);
 
        /*
index 23af893e9b86a38fd35770d1b6630b3bfd26c056..6b8bca67851f8c681e7c1d3eebd3eb39bbeb6a24 100644 (file)
@@ -240,7 +240,7 @@ struct bcma_drv_pci {
 
 extern void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
 extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
-extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
+extern int bcma_core_pci_irq_ctl(struct bcma_bus *bus,
                                 struct bcma_device *core, bool enable);
 extern void bcma_core_pci_power_save(struct bcma_bus *bus, bool up);