From c77ce474b1c57b13e9d36d9830f147966c143694 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Mon, 14 Jan 2008 22:08:14 +0100 Subject: Fix incorrect address test in AT91F_DataflashSelect(). Signed-off-by: Stelian Pop --- drivers/mtd/dataflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c index 91903c8..3ebb706 100644 --- a/drivers/mtd/dataflash.c +++ b/drivers/mtd/dataflash.c @@ -304,7 +304,7 @@ AT91PS_DataFlash AT91F_DataflashSelect (AT91PS_DataFlash pFlash, for (i = 0; i < CFG_MAX_DATAFLASH_BANKS; i++) if ( dataflash_info[i].id - && ((((int) addr) & 0xFF000000) == + && ((((int) *addr) & 0xFF000000) == dataflash_info[i].logical_address)) { addr_valid = 1; break; -- cgit v1.1 From 3cfb0c51b2bb5ede54eca85ace5b1ba12be314b0 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 17 Jan 2008 00:02:10 -0600 Subject: Remove duplicate defines for ARRAY_SIZE Signed-off-by: Kumar Gala --- drivers/mtd/jedec_flash.c | 4 ---- drivers/net/rtl8169.c | 2 -- 2 files changed, 6 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c index 94e87cb..41aad3b 100644 --- a/drivers/mtd/jedec_flash.c +++ b/drivers/mtd/jedec_flash.c @@ -218,10 +218,6 @@ static const struct amd_flash_info jedec_table[] = { #endif }; - -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - - static inline void fill_info(flash_info_t *info, const struct amd_flash_info *jedec_entry, ulong base) { int i,j; diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 57ccbd9..d71323f 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -352,8 +352,6 @@ int mdio_read(int RegAddr) return value; } -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - static int rtl8169_init_board(struct eth_device *dev) { int i; -- cgit v1.1 From 1b769881750030f10743808b9d6013e11f559350 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 25 Jan 2008 07:54:47 +0100 Subject: Fix remaining CONFIG_COMMANDS update comments Fix coding style Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/net/cs8900.c | 4 ++-- drivers/net/lan91c96.c | 20 ++++++++++---------- drivers/net/netarm_eth.c | 4 +--- drivers/net/rtl8019.c | 7 +------ drivers/rtc/rx8025.c | 5 +---- 5 files changed, 15 insertions(+), 25 deletions(-) (limited to 'drivers') diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c index 80c4ba2..55ef346 100644 --- a/drivers/net/cs8900.c +++ b/drivers/net/cs8900.c @@ -165,7 +165,7 @@ void cs8900_get_enetaddr (uchar * addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]) ; - debug ("### Set environment from HW MAC addr = \"%s\"\n", ethaddr); + debug ("### Set environment from HW MAC addr = \"%s\"\n", ethaddr); setenv ("ethaddr", ethaddr); } @@ -317,6 +317,6 @@ int cs8900_e2prom_write(unsigned char addr, unsigned short value) return 0; } -#endif /* COMMANDS & CFG_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_CS8900 */ diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c index ecdcbd9..51cfb7e 100644 --- a/drivers/net/lan91c96.c +++ b/drivers/net/lan91c96.c @@ -36,12 +36,12 @@ * AUI/TP selection ( mine has 10Base2/10BaseT select ) * * Arguments: - * io = for the base address + * io = for the base address * irq = for the IRQ * * author: - * Erik Stahlman ( erik@vt.edu ) - * Daris A Nevil ( dnevil@snmc.com ) + * Erik Stahlman ( erik@vt.edu ) + * Daris A Nevil ( dnevil@snmc.com ) * * * Hardware multicast code from Peter Cammaert ( pc@denkart.be ) @@ -53,7 +53,7 @@ * o lan91c96.c (Intel Diagnostic Manager driver) * * History: - * 04/30/03 Mathijs Haarman Modified smc91111.c (u-boot version) + * 04/30/03 Mathijs Haarman Modified smc91111.c (u-boot version) * for lan91c96 *--------------------------------------------------------------------------- */ @@ -296,8 +296,8 @@ static int poll4int (byte mask, int timeout) /* * Function: smc_reset( void ) * Purpose: - * This sets the SMC91111 chip to its normal state, hopefully from whatever - * mess that any other DOS driver has put it in. + * This sets the SMC91111 chip to its normal state, hopefully from whatever + * mess that any other DOS driver has put it in. * * Maybe I should reset more registers to defaults in here? SOFTRST should * do that for me. @@ -397,7 +397,7 @@ static void smc_shutdown () * This sends the actual packet to the SMC9xxx chip. * * Algorithm: - * First, see if a saved_skb is available. + * First, see if a saved_skb is available. * ( this should NOT be called if there is no 'saved_skb' * Now, find the packet number that the chip allocated * Point the data pointers at it in memory @@ -405,9 +405,9 @@ static void smc_shutdown () * Dump the packet to chip memory * Check if a last byte is needed ( odd length packet ) * if so, set the control flag right - * Tell the card to send it + * Tell the card to send it * Enable the transmit interrupt, so I know if it failed - * Free the kernel data if I actually sent it. + * Free the kernel data if I actually sent it. */ static int smc_send_packet (volatile void *packet, int packet_length) { @@ -865,7 +865,7 @@ static int smc_hw_init () } #endif /* 0 */ -#endif /* COMMANDS & CFG_NET */ +#endif /* CONFIG_CMD_NET */ /* smc_get_ethaddr (bd_t * bd) diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c index a99ee5d..ecf45dc 100644 --- a/drivers/net/netarm_eth.c +++ b/drivers/net/netarm_eth.c @@ -29,7 +29,6 @@ #include "netarm_eth.h" #include - #if defined(CONFIG_CMD_NET) static int na_mii_poll_busy (void); @@ -56,7 +55,6 @@ static void na_get_mac_addr (void) setenv ("ethaddr", ethaddr); } - static void na_mii_write (int reg, int value) { int mii_addr; @@ -355,6 +353,6 @@ extern int eth_send (volatile void *packet, int length) return 1; } -#endif /* COMMANDS & CFG_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_NETARMETH */ diff --git a/drivers/net/rtl8019.c b/drivers/net/rtl8019.c index 409a69f..9d62cab 100644 --- a/drivers/net/rtl8019.c +++ b/drivers/net/rtl8019.c @@ -36,16 +36,13 @@ #if defined(CONFIG_CMD_NET) - /* packet page register access functions */ - static unsigned char get_reg (unsigned int regno) { return (*(unsigned char *) regno); } - static void put_reg (unsigned int regno, unsigned char val) { *(volatile unsigned char *) regno = val; @@ -91,7 +88,6 @@ void rtl8019_get_enetaddr (uchar * addr) put_reg (RTL8019_COMMAND, RTL8019_PAGE0); } - void eth_halt (void) { put_reg (RTL8019_COMMAND, 0x01); @@ -134,7 +130,6 @@ int eth_init (bd_t * bd) return 0; } - static unsigned char nic_to_pc (void) { unsigned char rec_head_status; @@ -277,6 +272,6 @@ extern int eth_send (volatile void *packet, int length) return 0; } -#endif /* COMMANDS & CFG_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_RTL8019 */ diff --git a/drivers/rtc/rx8025.c b/drivers/rtc/rx8025.c index 6c94ae1..9122f12 100644 --- a/drivers/rtc/rx8025.c +++ b/drivers/rtc/rx8025.c @@ -142,7 +142,6 @@ void rtc_get (struct rtc_time *tmp) tmp->tm_hour, tmp->tm_min, tmp->tm_sec); } - /* * Set the RTC */ @@ -166,7 +165,6 @@ void rtc_set (struct rtc_time *tmp) rtc_write (RTC_CTL1_REG_ADDR, RTC_CTL1_BIT_2412); } - /* * Reset the RTC. We setting the date back to 1970-01-01. */ @@ -200,7 +198,6 @@ void rtc_reset (void) return; } - /* * Helper functions */ @@ -224,4 +221,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_RX8025 && (CFG_COMMANDS & CFG_CMD_DATE) */ +#endif /* CONFIG_RTC_RX8025 && CONFIG_CMD_DATE */ -- cgit v1.1