1 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
2 +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
3 @@ -584,7 +584,7 @@ void ai_detach(struct si_pub *sih)
4 struct si_pub *si_local = NULL;
5 memcpy(&si_local, &sih, sizeof(struct si_pub **));
7 - sii = (struct si_info *)sih;
8 + sii = container_of(sih, struct si_info, pub);
12 @@ -599,7 +599,7 @@ struct bcma_device *ai_findcore(struct s
16 - sii = (struct si_info *)sih;
17 + sii = container_of(sih, struct si_info, pub);
21 @@ -622,7 +622,7 @@ uint ai_cc_reg(struct si_pub *sih, uint
25 - sii = (struct si_info *)sih;
26 + sii = container_of(sih, struct si_info, pub);
27 cc = sii->icbus->drv_cc.core;
30 @@ -716,7 +716,7 @@ u16 ai_clkctl_fast_pwrup_delay(struct si
34 - sii = (struct si_info *)sih;
35 + sii = container_of(sih, struct si_info, pub);
36 if (ai_get_cccaps(sih) & CC_CAP_PMU) {
37 fpdelay = si_pmu_fast_pwrup_delay(sih);
39 @@ -748,7 +748,7 @@ bool ai_clkctl_cc(struct si_pub *sih, en
41 struct bcma_device *cc;
43 - sii = (struct si_info *)sih;
44 + sii = container_of(sih, struct si_info, pub);
46 cc = ai_findcore(&sii->pub, BCMA_CORE_CHIPCOMMON, 0);
47 bcma_core_set_clockmode(cc, mode);
48 @@ -759,7 +759,7 @@ void ai_pci_up(struct si_pub *sih)
52 - sii = (struct si_info *)sih;
53 + sii = container_of(sih, struct si_info, pub);
55 if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
56 bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, true);
57 @@ -770,7 +770,7 @@ void ai_pci_down(struct si_pub *sih)
61 - sii = (struct si_info *)sih;
62 + sii = container_of(sih, struct si_info, pub);
64 if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
65 bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, false);
66 @@ -793,7 +793,7 @@ bool ai_deviceremoved(struct si_pub *sih
70 - sii = (struct si_info *)sih;
71 + sii = container_of(sih, struct si_info, pub);
73 if (sii->icbus->hosttype != BCMA_HOSTTYPE_PCI)