Skip to content

Commit 00bcda4

Browse files
haukelinvjw
authored andcommitted
brcmsmac: do not access host_pci
The irq number is copied from the PCIe host device to the bcma cores so just request it using the bcma core device. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 270e38d commit 00bcda4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ void brcms_dpc(unsigned long data)
769769
* Precondition: Since this function is called in brcms_pci_probe() context,
770770
* no locking is required.
771771
*/
772-
static int brcms_request_fw(struct brcms_info *wl, struct pci_dev *pdev)
772+
static int brcms_request_fw(struct brcms_info *wl, struct bcma_device *pdev)
773773
{
774774
int status;
775775
struct device *device = &pdev->dev;
@@ -1021,7 +1021,7 @@ static struct brcms_info *brcms_attach(struct bcma_device *pdev)
10211021
spin_lock_init(&wl->isr_lock);
10221022

10231023
/* prepare ucode */
1024-
if (brcms_request_fw(wl, pdev->bus->host_pci) < 0) {
1024+
if (brcms_request_fw(wl, pdev) < 0) {
10251025
wiphy_err(wl->wiphy, "%s: Failed to find firmware usually in "
10261026
"%s\n", KBUILD_MODNAME, "/lib/firmware/brcm");
10271027
brcms_release_fw(wl);
@@ -1042,12 +1042,12 @@ static struct brcms_info *brcms_attach(struct bcma_device *pdev)
10421042
wl->pub->ieee_hw = hw;
10431043

10441044
/* register our interrupt handler */
1045-
if (request_irq(pdev->bus->host_pci->irq, brcms_isr,
1045+
if (request_irq(pdev->irq, brcms_isr,
10461046
IRQF_SHARED, KBUILD_MODNAME, wl)) {
10471047
wiphy_err(wl->wiphy, "wl%d: request_irq() failed\n", unit);
10481048
goto fail;
10491049
}
1050-
wl->irq = pdev->bus->host_pci->irq;
1050+
wl->irq = pdev->irq;
10511051

10521052
/* register module */
10531053
brcms_c_module_register(wl->pub, "linux", wl, NULL);
@@ -1097,7 +1097,7 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
10971097

10981098
dev_info(&pdev->dev, "mfg %x core %x rev %d class %d irq %d\n",
10991099
pdev->id.manuf, pdev->id.id, pdev->id.rev, pdev->id.class,
1100-
pdev->bus->host_pci->irq);
1100+
pdev->irq);
11011101

11021102
if ((pdev->id.manuf != BCMA_MANUF_BCM) ||
11031103
(pdev->id.id != BCMA_CORE_80211))

0 commit comments

Comments
 (0)