Skip to content

Commit

Permalink
bnx2: Use const on flash_table structure.
Browse files Browse the repository at this point in the history
The structure, once initialized, never changes.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Aug 23, 2009
1 parent cf7474a commit 0ced9d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_tbl) = {
{ 0, }
};

static struct flash_spec flash_table[] =
static const struct flash_spec flash_table[] =
{
#define BUFFERED_FLAGS (BNX2_NV_BUFFERED | BNX2_NV_TRANSLATE)
#define NONBUFFERED_FLAGS (BNX2_NV_WREN)
Expand Down Expand Up @@ -234,7 +234,7 @@ static struct flash_spec flash_table[] =
"Buffered flash (256kB)"},
};

static struct flash_spec flash_5709 = {
static const struct flash_spec flash_5709 = {
.flags = BNX2_NV_BUFFERED,
.page_bits = BCM5709_FLASH_PAGE_BITS,
.page_size = BCM5709_FLASH_PAGE_SIZE,
Expand Down Expand Up @@ -4227,7 +4227,7 @@ bnx2_init_nvram(struct bnx2 *bp)
{
u32 val;
int j, entry_count, rc = 0;
struct flash_spec *flash;
const struct flash_spec *flash;

if (CHIP_NUM(bp) == CHIP_NUM_5709) {
bp->flash_info = &flash_5709;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bnx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6889,7 +6889,7 @@ struct bnx2 {
int pm_cap;
int pcix_cap;

struct flash_spec *flash_info;
const struct flash_spec *flash_info;
u32 flash_size;

int status_stats_size;
Expand Down

0 comments on commit 0ced9d0

Please sign in to comment.