Commit 0ced9d01 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnx2: Use const on flash_table structure.

The structure, once initialized, never changes.
Signed-off-by: default avatarBenjamin Li <benli@broadcom.com>
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cf7474a6
...@@ -145,7 +145,7 @@ static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_tbl) = { ...@@ -145,7 +145,7 @@ static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_tbl) = {
{ 0, } { 0, }
}; };
static struct flash_spec flash_table[] = static const struct flash_spec flash_table[] =
{ {
#define BUFFERED_FLAGS (BNX2_NV_BUFFERED | BNX2_NV_TRANSLATE) #define BUFFERED_FLAGS (BNX2_NV_BUFFERED | BNX2_NV_TRANSLATE)
#define NONBUFFERED_FLAGS (BNX2_NV_WREN) #define NONBUFFERED_FLAGS (BNX2_NV_WREN)
...@@ -234,7 +234,7 @@ static struct flash_spec flash_table[] = ...@@ -234,7 +234,7 @@ static struct flash_spec flash_table[] =
"Buffered flash (256kB)"}, "Buffered flash (256kB)"},
}; };
static struct flash_spec flash_5709 = { static const struct flash_spec flash_5709 = {
.flags = BNX2_NV_BUFFERED, .flags = BNX2_NV_BUFFERED,
.page_bits = BCM5709_FLASH_PAGE_BITS, .page_bits = BCM5709_FLASH_PAGE_BITS,
.page_size = BCM5709_FLASH_PAGE_SIZE, .page_size = BCM5709_FLASH_PAGE_SIZE,
...@@ -4227,7 +4227,7 @@ bnx2_init_nvram(struct bnx2 *bp) ...@@ -4227,7 +4227,7 @@ bnx2_init_nvram(struct bnx2 *bp)
{ {
u32 val; u32 val;
int j, entry_count, rc = 0; int j, entry_count, rc = 0;
struct flash_spec *flash; const struct flash_spec *flash;
if (CHIP_NUM(bp) == CHIP_NUM_5709) { if (CHIP_NUM(bp) == CHIP_NUM_5709) {
bp->flash_info = &flash_5709; bp->flash_info = &flash_5709;
......
...@@ -6889,7 +6889,7 @@ struct bnx2 { ...@@ -6889,7 +6889,7 @@ struct bnx2 {
int pm_cap; int pm_cap;
int pcix_cap; int pcix_cap;
struct flash_spec *flash_info; const struct flash_spec *flash_info;
u32 flash_size; u32 flash_size;
int status_stats_size; int status_stats_size;
......
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