Commit 07cefb9f authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: replaced void *btparam into struct pci_dev *btparam

Code cleanup. Since the softmac driver only supports a PCI(e) bus, the void *
could be replaced with a less generic type.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 821e4e93
...@@ -861,7 +861,8 @@ u32 ai_core_sflags(struct si_pub *sih, u32 mask, u32 val) ...@@ -861,7 +861,8 @@ u32 ai_core_sflags(struct si_pub *sih, u32 mask, u32 val)
/* *************** from siutils.c ************** */ /* *************** from siutils.c ************** */
/* local prototypes */ /* local prototypes */
static struct si_info *ai_doattach(struct si_info *sii, void *regs, static struct si_info *ai_doattach(struct si_info *sii, void *regs,
void *sdh, char **vars, uint *varsz); struct pci_dev *sdh,
char **vars, uint *varsz);
static bool ai_buscore_prep(struct si_info *sii); static bool ai_buscore_prep(struct si_info *sii);
static bool ai_buscore_setup(struct si_info *sii, struct chipcregs *cc, static bool ai_buscore_setup(struct si_info *sii, struct chipcregs *cc,
u32 savewin, uint *origidx, void *regs); u32 savewin, uint *origidx, void *regs);
...@@ -881,7 +882,8 @@ static bool ai_ispcie(struct si_info *sii); ...@@ -881,7 +882,8 @@ static bool ai_ispcie(struct si_info *sii);
* vars - pointer to a pointer area for "environment" variables * vars - pointer to a pointer area for "environment" variables
* varsz - pointer to int to return the size of the vars * varsz - pointer to int to return the size of the vars
*/ */
struct si_pub *ai_attach(void *regs, void *sdh, char **vars, uint *varsz) struct si_pub *
ai_attach(void *regs, struct pci_dev *sdh, char **vars, uint *varsz)
{ {
struct si_info *sii; struct si_info *sii;
...@@ -1052,7 +1054,7 @@ static __used void ai_nvram_process(struct si_info *sii, char *pvars) ...@@ -1052,7 +1054,7 @@ static __used void ai_nvram_process(struct si_info *sii, char *pvars)
} }
static struct si_info *ai_doattach(struct si_info *sii, static struct si_info *ai_doattach(struct si_info *sii,
void *regs, void *pbus, void *regs, struct pci_dev *pbus,
char **vars, uint *varsz) char **vars, uint *varsz)
{ {
struct si_pub *sih = &sii->pub; struct si_pub *sih = &sii->pub;
......
...@@ -446,6 +446,8 @@ struct si_pub { ...@@ -446,6 +446,8 @@ struct si_pub {
#define IS_SIM(chippkg) \ #define IS_SIM(chippkg) \
((chippkg == HDLSIM_PKG_ID) || (chippkg == HWSIM_PKG_ID)) ((chippkg == HDLSIM_PKG_ID) || (chippkg == HWSIM_PKG_ID))
struct pci_dev;
struct gpioh_item { struct gpioh_item {
void *arg; void *arg;
bool level; bool level;
...@@ -515,7 +517,7 @@ extern u32 ai_addrspacesize(struct si_pub *sih, uint asidx); ...@@ -515,7 +517,7 @@ extern u32 ai_addrspacesize(struct si_pub *sih, uint asidx);
extern void ai_write_wrap_reg(struct si_pub *sih, u32 offset, u32 val); extern void ai_write_wrap_reg(struct si_pub *sih, u32 offset, u32 val);
/* === exported functions === */ /* === exported functions === */
extern struct si_pub *ai_attach(void *regs, void *sdh, char **vars, extern struct si_pub *ai_attach(void *regs, struct pci_dev *sdh, char **vars,
uint *varsz); uint *varsz);
extern void ai_detach(struct si_pub *sih); extern void ai_detach(struct si_pub *sih);
extern bool ai_pci_war16165(struct si_pub *sih); extern bool ai_pci_war16165(struct si_pub *sih);
......
...@@ -755,7 +755,7 @@ static int brcms_set_hint(struct brcms_info *wl, char *abbrev) ...@@ -755,7 +755,7 @@ static int brcms_set_hint(struct brcms_info *wl, char *abbrev)
*/ */
static struct brcms_info *brcms_attach(u16 vendor, u16 device, static struct brcms_info *brcms_attach(u16 vendor, u16 device,
unsigned long regs, unsigned long regs,
void *btparam, uint irq) struct pci_dev *btparam, uint irq)
{ {
struct brcms_info *wl = NULL; struct brcms_info *wl = NULL;
int unit, err; int unit, err;
...@@ -795,11 +795,11 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device, ...@@ -795,11 +795,11 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device,
spin_lock_init(&wl->isr_lock); spin_lock_init(&wl->isr_lock);
/* prepare ucode */ /* prepare ucode */
if (brcms_request_fw(wl, (struct pci_dev *)btparam) < 0) { if (brcms_request_fw(wl, btparam) < 0) {
wiphy_err(wl->wiphy, "%s: Failed to find firmware usually in " wiphy_err(wl->wiphy, "%s: Failed to find firmware usually in "
"%s\n", KBUILD_MODNAME, "/lib/firmware/brcm"); "%s\n", KBUILD_MODNAME, "/lib/firmware/brcm");
brcms_release_fw(wl); brcms_release_fw(wl);
brcms_remove((struct pci_dev *)btparam); brcms_remove(btparam);
return NULL; return NULL;
} }
......
...@@ -313,7 +313,7 @@ struct brcms_b_state; ...@@ -313,7 +313,7 @@ struct brcms_b_state;
static int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, static int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device,
uint unit, bool piomode, void *regsva, uint unit, bool piomode, void *regsva,
void *btparam); struct pci_dev *btparam);
/* up/down, reset, clk */ /* up/down, reset, clk */
static void brcms_b_reset(struct brcms_hardware *wlc_hw); static void brcms_b_reset(struct brcms_hardware *wlc_hw);
...@@ -4301,7 +4301,7 @@ struct brcms_pub *brcms_c_pub(void *wlc) ...@@ -4301,7 +4301,7 @@ struct brcms_pub *brcms_c_pub(void *wlc)
* put the whole chip in reset(driver down state), no clock * put the whole chip in reset(driver down state), no clock
*/ */
int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit, int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
bool piomode, void *regsva, void *btparam) bool piomode, void *regsva, struct pci_dev *btparam)
{ {
struct brcms_hardware *wlc_hw; struct brcms_hardware *wlc_hw;
struct d11regs *regs; struct d11regs *regs;
...@@ -4644,8 +4644,9 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit, ...@@ -4644,8 +4644,9 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
/* /*
* The common driver entry routine. Error codes should be unique * The common driver entry routine. Error codes should be unique
*/ */
void *brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit, void *
bool piomode, void *regsva, void *btparam, uint *perr) brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
bool piomode, void *regsva, struct pci_dev *btparam, uint *perr)
{ {
struct brcms_c_info *wlc; struct brcms_c_info *wlc;
uint err = 0; uint err = 0;
......
...@@ -551,7 +551,7 @@ struct brcms_antselcfg { ...@@ -551,7 +551,7 @@ struct brcms_antselcfg {
/* common functions for every port */ /* common functions for every port */
extern void *brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, extern void *brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device,
uint unit, bool piomode, void *regsva, uint unit, bool piomode, void *regsva,
void *btparam, uint *perr); struct pci_dev *btparam, uint *perr);
extern uint brcms_c_detach(struct brcms_c_info *wlc); extern uint brcms_c_detach(struct brcms_c_info *wlc);
extern int brcms_c_up(struct brcms_c_info *wlc); extern int brcms_c_up(struct brcms_c_info *wlc);
extern uint brcms_c_down(struct brcms_c_info *wlc); extern uint brcms_c_down(struct brcms_c_info *wlc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment