diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 4688904908ec..758c115b556e 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
@@ -108,9 +108,15 @@ static inline int brcmf_sdioh_f0_write_byte(struct brcmf_sdio_dev *sdiodev, | |||
108 | sdio_release_host(sdfunc); | 108 | sdio_release_host(sdfunc); |
109 | } | 109 | } |
110 | } else if (regaddr == SDIO_CCCR_ABORT) { | 110 | } else if (regaddr == SDIO_CCCR_ABORT) { |
111 | sdfunc = kmemdup(sdiodev->func[0], sizeof(struct sdio_func), | ||
112 | GFP_KERNEL); | ||
113 | if (!sdfunc) | ||
114 | return -ENOMEM; | ||
115 | sdfunc->num = 0; | ||
111 | sdio_claim_host(sdfunc); | 116 | sdio_claim_host(sdfunc); |
112 | sdio_writeb(sdfunc, *byte, regaddr, &err_ret); | 117 | sdio_writeb(sdfunc, *byte, regaddr, &err_ret); |
113 | sdio_release_host(sdfunc); | 118 | sdio_release_host(sdfunc); |
119 | kfree(sdfunc); | ||
114 | } else if (regaddr < 0xF0) { | 120 | } else if (regaddr < 0xF0) { |
115 | brcmf_dbg(ERROR, "F0 Wr:0x%02x: write disallowed\n", regaddr); | 121 | brcmf_dbg(ERROR, "F0 Wr:0x%02x: write disallowed\n", regaddr); |
116 | err_ret = -EPERM; | 122 | err_ret = -EPERM; |
@@ -486,7 +492,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func, | |||
486 | kfree(bus_if); | 492 | kfree(bus_if); |
487 | return -ENOMEM; | 493 | return -ENOMEM; |
488 | } | 494 | } |
489 | sdiodev->func[0] = func->card->sdio_func[0]; | 495 | sdiodev->func[0] = func; |
490 | sdiodev->func[1] = func; | 496 | sdiodev->func[1] = func; |
491 | sdiodev->bus_if = bus_if; | 497 | sdiodev->bus_if = bus_if; |
492 | bus_if->bus_priv.sdio = sdiodev; | 498 | bus_if->bus_priv.sdio = sdiodev; |