linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>, linux-wireless@vger.kernel.org
Cc: "Hauke Mehrtens" <hauke@hauke-m.de>,
	brcm80211-dev-list@broadcom.com,
	"Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH 2/4] bcma: change IRQ control function to accept bus as an argument
Date: Fri, 30 Jan 2015 18:22:44 +0100	[thread overview]
Message-ID: <1422638566-7593-2-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1422638566-7593-1-git-send-email-zajec5@gmail.com>

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>
---
 drivers/bcma/driver_pci.c                      | 6 +++---
 drivers/net/wireless/b43/main.c                | 2 +-
 drivers/net/wireless/brcm80211/brcmsmac/main.c | 2 +-
 include/linux/bcma/bcma_driver_pci.h           | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index cf92bfa..cfd35bc 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -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)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index e129b4c..44794d2 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -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;
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index bcbfc6e..c84af1d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -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);
 
 	/*
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h
index 23af893..6b8bca6 100644
--- a/include/linux/bcma/bcma_driver_pci.h
+++ b/include/linux/bcma/bcma_driver_pci.h
@@ -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);
 
-- 
1.8.4.5


  reply	other threads:[~2015-01-30 17:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 17:22 [PATCH 1/4] bcma: add helpers bringing PCIe hosted bus up / down Rafał Miłecki
2015-01-30 17:22 ` Rafał Miłecki [this message]
2015-01-30 17:22 ` [PATCH 3/4] bcma: support bringing up bus hosted on PCIe Gen 2 Rafał Miłecki
2015-01-30 19:59   ` Hauke Mehrtens
2015-01-30 23:08     ` Rafał Miłecki
2015-02-06  6:56       ` Kalle Valo
2015-02-08 14:12         ` Hauke Mehrtens
2015-01-30 17:22 ` [PATCH 4/4] bcma: enable support for PCIe Gen 2 host devices Rafał Miłecki
2015-02-08 15:31 ` [PATCH V2 1/4] bcma: add helpers bringing PCIe hosted bus up / down Rafał Miłecki
2015-02-08 15:31   ` [PATCH V2 2/4] bcma: change IRQ control function to accept bus as an argument Rafał Miłecki
2015-02-08 15:31   ` [PATCH V2 3/4] bcma: support bringing up bus hosted on PCIe Gen 2 Rafał Miłecki
2015-02-08 15:31   ` [PATCH V2 4/4] bcma: enable support for PCIe Gen 2 host devices Rafał Miłecki
2015-02-08 16:11   ` [PATCH V3 1/4] bcma: add helpers bringing PCIe hosted bus up / down Rafał Miłecki
2015-02-08 16:11     ` [PATCH V3 2/4] bcma: change IRQ control function to accept bus as an argument Rafał Miłecki
2015-02-08 16:11     ` [PATCH V3 3/4] bcma: support bringing up bus hosted on PCIe Gen 2 Rafał Miłecki
2015-02-08 16:11     ` [PATCH V3 4/4] bcma: enable support for PCIe Gen 2 host devices Rafał Miłecki
2015-03-02 15:00     ` [PATCH V3 1/4] bcma: add helpers bringing PCIe hosted bus up / down Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422638566-7593-2-git-send-email-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=hauke@hauke-m.de \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).