diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-25 12:31:28 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-25 12:31:28 +0200 |
commit | 8700600a74852d75eb965b969dcf9f58e2b32546 (patch) | |
tree | 1490919076921ecc208bf667a8c2f8a7c5446854 /arch/mips/lasat/lasat_board.c | |
parent | b8e0418b2a25f975c3b8764030c24b7253d33a68 (diff) | |
parent | 543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff) |
Merge branch 'linus' into x86/nmitip-x86-nmi-2008-06-25_10.31_Wed
Diffstat (limited to 'arch/mips/lasat/lasat_board.c')
-rw-r--r-- | arch/mips/lasat/lasat_board.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c index ec2f658c3709..31e328b3814d 100644 --- a/arch/mips/lasat/lasat_board.c +++ b/arch/mips/lasat/lasat_board.c @@ -23,18 +23,19 @@ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ctype.h> +#include <linux/mutex.h> #include <asm/bootinfo.h> #include <asm/addrspace.h> #include "at93c.h" /* New model description table */ #include "lasat_models.h" +static DEFINE_MUTEX(lasat_eeprom_mutex); + #define EEPROM_CRC(data, len) (~crc32(~0, data, len)) struct lasat_info lasat_board_info; -void update_bcastaddr(void); - int EEPROMRead(unsigned int pos, unsigned char *data, int len) { int i; @@ -258,10 +259,6 @@ int lasat_init_board_info(void) sprintf(lasat_board_info.li_typestr, "%d", 10 * c); } -#if defined(CONFIG_INET) && defined(CONFIG_SYSCTL) - update_bcastaddr(); -#endif - return 0; } @@ -269,6 +266,8 @@ void lasat_write_eeprom_info(void) { unsigned long crc; + mutex_lock(&lasat_eeprom_mutex); + /* Generate the CRC */ crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info), sizeof(struct lasat_eeprom_struct) - 4); @@ -277,4 +276,6 @@ void lasat_write_eeprom_info(void) /* Write the EEPROM info */ EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info, sizeof(struct lasat_eeprom_struct)); + + mutex_unlock(&lasat_eeprom_mutex); } |