Commit 62676463 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove device id parameter from ai_attach()

The device id is passed to ai_attach() and subsequent functions
without actually being used. It can be removed.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 44c069ec
...@@ -434,7 +434,7 @@ static void ai_hwfixup(si_info_t *sii) ...@@ -434,7 +434,7 @@ static void ai_hwfixup(si_info_t *sii)
} }
/* parse the enumeration rom to identify all cores */ /* parse the enumeration rom to identify all cores */
void ai_scan(struct si_pub *sih, void *regs, uint devid) void ai_scan(struct si_pub *sih, void *regs)
{ {
si_info_t *sii = SI_INFO(sih); si_info_t *sii = SI_INFO(sih);
chipcregs_t *cc = (chipcregs_t *) regs; chipcregs_t *cc = (chipcregs_t *) regs;
...@@ -850,11 +850,10 @@ u32 ai_core_sflags(struct si_pub *sih, u32 mask, u32 val) ...@@ -850,11 +850,10 @@ u32 ai_core_sflags(struct si_pub *sih, u32 mask, u32 val)
/* *************** from siutils.c ************** */ /* *************** from siutils.c ************** */
/* local prototypes */ /* local prototypes */
static si_info_t *ai_doattach(si_info_t *sii, uint devid, void *regs, static si_info_t *ai_doattach(si_info_t *sii, void *regs,
uint bustype, void *sdh, char **vars, uint bustype, void *sdh, char **vars,
uint *varsz); uint *varsz);
static bool ai_buscore_prep(si_info_t *sii, uint bustype, uint devid, static bool ai_buscore_prep(si_info_t *sii, uint bustype);
void *sdh);
static bool ai_buscore_setup(si_info_t *sii, chipcregs_t *cc, uint bustype, static bool ai_buscore_setup(si_info_t *sii, chipcregs_t *cc, uint bustype,
u32 savewin, uint *origidx, void *regs); u32 savewin, uint *origidx, void *regs);
static void ai_nvram_process(si_info_t *sii, char *pvars); static void ai_nvram_process(si_info_t *sii, char *pvars);
...@@ -877,7 +876,7 @@ static u32 ai_gpioreservation; ...@@ -877,7 +876,7 @@ static u32 ai_gpioreservation;
* 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(uint devid, void *regs, uint bustype, struct si_pub *ai_attach(void *regs, uint bustype,
void *sdh, char **vars, uint *varsz) void *sdh, char **vars, uint *varsz)
{ {
si_info_t *sii; si_info_t *sii;
...@@ -889,7 +888,7 @@ struct si_pub *ai_attach(uint devid, void *regs, uint bustype, ...@@ -889,7 +888,7 @@ struct si_pub *ai_attach(uint devid, void *regs, uint bustype,
return NULL; return NULL;
} }
if (ai_doattach(sii, devid, regs, bustype, sdh, vars, varsz) == if (ai_doattach(sii, regs, bustype, sdh, vars, varsz) ==
NULL) { NULL) {
kfree(sii); kfree(sii);
return NULL; return NULL;
...@@ -903,8 +902,7 @@ struct si_pub *ai_attach(uint devid, void *regs, uint bustype, ...@@ -903,8 +902,7 @@ struct si_pub *ai_attach(uint devid, void *regs, uint bustype,
/* global kernel resource */ /* global kernel resource */
static si_info_t ksii; static si_info_t ksii;
static bool ai_buscore_prep(si_info_t *sii, uint bustype, uint devid, static bool ai_buscore_prep(si_info_t *sii, uint bustype)
void *sdh)
{ {
/* kludge to enable the clock on the 4306 which lacks a slowclock */ /* kludge to enable the clock on the 4306 which lacks a slowclock */
if (bustype == PCI_BUS && !ai_ispcie(sii)) if (bustype == PCI_BUS && !ai_ispcie(sii))
...@@ -1070,7 +1068,7 @@ static __used void ai_nvram_process(si_info_t *sii, char *pvars) ...@@ -1070,7 +1068,7 @@ static __used void ai_nvram_process(si_info_t *sii, char *pvars)
sii->pub.boardflags = getintvar(pvars, "boardflags"); sii->pub.boardflags = getintvar(pvars, "boardflags");
} }
static si_info_t *ai_doattach(si_info_t *sii, uint devid, static si_info_t *ai_doattach(si_info_t *sii,
void *regs, uint bustype, void *pbus, void *regs, uint bustype, void *pbus,
char **vars, uint *varsz) char **vars, uint *varsz)
{ {
...@@ -1116,7 +1114,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid, ...@@ -1116,7 +1114,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
sih->bustype = bustype; sih->bustype = bustype;
/* bus/core/clk setup for register access */ /* bus/core/clk setup for register access */
if (!ai_buscore_prep(sii, bustype, devid, pbus)) { if (!ai_buscore_prep(sii, bustype)) {
SI_ERROR(("si_doattach: si_core_clk_prep failed %d\n", SI_ERROR(("si_doattach: si_core_clk_prep failed %d\n",
bustype)); bustype));
return NULL; return NULL;
...@@ -1142,7 +1140,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid, ...@@ -1142,7 +1140,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
if (socitype == SOCI_AI) { if (socitype == SOCI_AI) {
SI_MSG(("Found chip type AI (0x%08x)\n", w)); SI_MSG(("Found chip type AI (0x%08x)\n", w));
/* pass chipc address instead of original core base */ /* pass chipc address instead of original core base */
ai_scan(&sii->pub, (void *)cc, devid); ai_scan(&sii->pub, (void *)cc);
} else { } else {
SI_ERROR(("Found chip of unknown type (0x%08x)\n", w)); SI_ERROR(("Found chip of unknown type (0x%08x)\n", w));
return NULL; return NULL;
......
...@@ -499,7 +499,7 @@ struct si_info { ...@@ -499,7 +499,7 @@ struct si_info {
}; };
/* AMBA Interconnect exported externs */ /* AMBA Interconnect exported externs */
extern void ai_scan(struct si_pub *sih, void *regs, uint devid); extern void ai_scan(struct si_pub *sih, void *regs);
extern uint ai_flag(struct si_pub *sih); extern uint ai_flag(struct si_pub *sih);
extern void ai_setint(struct si_pub *sih, int siflag); extern void ai_setint(struct si_pub *sih, int siflag);
...@@ -521,7 +521,7 @@ extern u32 ai_addrspacesize(struct si_pub *sih, uint asidx); ...@@ -521,7 +521,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(uint pcidev, void *regs, uint bustype, extern struct si_pub *ai_attach(void *regs, uint bustype,
void *sdh, char **vars, uint *varsz); void *sdh, char **vars, uint *varsz);
extern void ai_detach(struct si_pub *sih); extern void ai_detach(struct si_pub *sih);
......
...@@ -610,7 +610,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, ...@@ -610,7 +610,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
* Also initialize software state that depends on the particular hardware * Also initialize software state that depends on the particular hardware
* we are running. * we are running.
*/ */
wlc_hw->sih = ai_attach((uint) device, regsva, bustype, btparam, wlc_hw->sih = ai_attach(regsva, bustype, btparam,
&wlc_hw->vars, &wlc_hw->vars_size); &wlc_hw->vars, &wlc_hw->vars_size);
if (wlc_hw->sih == NULL) { if (wlc_hw->sih == NULL) {
wiphy_err(wiphy, "wl%d: wlc_bmac_attach: si_attach failed\n", wiphy_err(wiphy, "wl%d: wlc_bmac_attach: si_attach failed\n",
......
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