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

staging: brcm80211: cleanup functions in nvram.c

Several function in nvram.c take a pointer value which is not
actually used. These are removed and the header file contained
some other prototypes that were not implemented. As this source
file was the only one using the header file siutils.h it has been
removed.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1f602d68
...@@ -860,7 +860,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid, ...@@ -860,7 +860,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
} }
/* Init nvram from flash if it exists */ /* Init nvram from flash if it exists */
nvram_init((void *)&(sii->pub)); nvram_init();
/* Init nvram from sprom/otp if they exist */ /* Init nvram from sprom/otp if they exist */
if (srom_var_init if (srom_var_init
...@@ -970,7 +970,7 @@ void ai_detach(si_t *sih) ...@@ -970,7 +970,7 @@ void ai_detach(si_t *sih)
sii->regs[idx] = NULL; sii->regs[idx] = NULL;
} }
nvram_exit((void *)si_local); /* free up nvram buffers */ nvram_exit(); /* free up nvram buffers */
if (sih->bustype == PCI_BUS) { if (sih->bustype == PCI_BUS) {
if (sii->pch) if (sii->pch)
......
...@@ -18,10 +18,8 @@ ...@@ -18,10 +18,8 @@
#include <linux/string.h> #include <linux/string.h>
#include <bcmdefs.h> #include <bcmdefs.h>
#include <bcmutils.h> #include <bcmutils.h>
#include <siutils.h>
#include <bcmnvram.h> #include <bcmnvram.h>
#include <sbchipc.h> #include <sbchipc.h>
#include <bcmsrom.h>
#include <bcmdevs.h> #include <bcmdevs.h>
#include <hndsoc.h> #include <hndsoc.h>
...@@ -42,7 +40,7 @@ static vars_t *vars; ...@@ -42,7 +40,7 @@ static vars_t *vars;
static char *findvar(char *vars, char *lim, const char *name); static char *findvar(char *vars, char *lim, const char *name);
int nvram_init(void *si) int nvram_init(void)
{ {
/* Make sure we read nvram in flash just once before freeing the memory */ /* Make sure we read nvram in flash just once before freeing the memory */
...@@ -53,7 +51,7 @@ int nvram_init(void *si) ...@@ -53,7 +51,7 @@ int nvram_init(void *si)
return 0; return 0;
} }
int nvram_append(void *si, char *varlst, uint varsz) int nvram_append(char *varlst, uint varsz)
{ {
uint bufsz = VARS_T_OH; uint bufsz = VARS_T_OH;
vars_t *new; vars_t *new;
...@@ -71,14 +69,11 @@ int nvram_append(void *si, char *varlst, uint varsz) ...@@ -71,14 +69,11 @@ int nvram_append(void *si, char *varlst, uint varsz)
return 0; return 0;
} }
void nvram_exit(void *si) void nvram_exit(void)
{ {
vars_t *this, *next; vars_t *this, *next;
si_t *sih;
sih = (si_t *) si;
this = vars; this = vars;
if (this) if (this)
kfree(this->vars); kfree(this->vars);
...@@ -175,7 +170,7 @@ int nvram_unset(const char *name) ...@@ -175,7 +170,7 @@ int nvram_unset(const char *name)
return 0; return 0;
} }
int nvram_reset(void *si) int nvram_reset(void)
{ {
return 0; return 0;
} }
......
...@@ -29,32 +29,27 @@ struct nvram_header { ...@@ -29,32 +29,27 @@ struct nvram_header {
u32 config_ncdl; /* ncdl values for memc */ u32 config_ncdl; /* ncdl values for memc */
}; };
/*
* Get default value for an NVRAM variable
*/
extern char *nvram_default_get(const char *name);
/* /*
* Initialize NVRAM access. May be unnecessary or undefined on certain * Initialize NVRAM access. May be unnecessary or undefined on certain
* platforms. * platforms.
*/ */
extern int nvram_init(void *sih); extern int nvram_init(void);
/* /*
* Append a chunk of nvram variables to the global list * Append a chunk of nvram variables to the global list
*/ */
extern int nvram_append(void *si, char *vars, uint varsz); extern int nvram_append(char *vars, uint varsz);
/* /*
* Check for reset button press for restoring factory defaults. * Check for reset button press for restoring factory defaults.
*/ */
extern int nvram_reset(void *sih); extern int nvram_reset(void);
/* /*
* Disable NVRAM access. May be unnecessary or undefined on certain * Disable NVRAM access. May be unnecessary or undefined on certain
* platforms. * platforms.
*/ */
extern void nvram_exit(void *sih); extern void nvram_exit(void);
/* /*
* Get the value of an NVRAM variable. The pointer returned may be * Get the value of an NVRAM variable. The pointer returned may be
...@@ -64,12 +59,6 @@ extern void nvram_exit(void *sih); ...@@ -64,12 +59,6 @@ extern void nvram_exit(void *sih);
*/ */
extern char *nvram_get(const char *name); extern char *nvram_get(const char *name);
/*
* Read the reset GPIO value from the nvram and set the GPIO
* as input
*/
extern int nvram_resetgpio_init(void *sih);
/* /*
* Get the value of an NVRAM variable. * Get the value of an NVRAM variable.
* @param name name of variable to get * @param name name of variable to get
...@@ -139,12 +128,6 @@ extern int nvram_commit(void); ...@@ -139,12 +128,6 @@ extern int nvram_commit(void);
*/ */
extern int nvram_getall(char *nvram_buf, int count); extern int nvram_getall(char *nvram_buf, int count);
/*
* returns the crc value of the nvram
* @param nvh nvram header pointer
*/
u8 nvram_calc_crc(struct nvram_header *nvh);
#endif /* _LANGUAGE_ASSEMBLY */ #endif /* _LANGUAGE_ASSEMBLY */
/* variable access */ /* variable access */
......
This diff is collapsed.
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