Skip to contentSkip to conversation

Ethernut 5: fix build error

PATCH New Prabhakar Lad 2 participants 2 messages Feb 23, 2012 – Feb 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Ethernut 5: fix build error

Fix build error for ethernut5 board due to prototype change for function board_mmc_getcd().
ethernut5.c:238: error: conflicting types for 'board_mmc_getcd' u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd' was here
make[2]: *** [ethernut5.o] Error 1

Cc Tim Schendekehl <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Albert ARIBAUD <[email protected]>
Cc egnite GmbH <[email protected]>

---
Changes for v2:
Description change.

 board/egnite/ethernut5/ethernut5.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
board/egnite/ethernut5/ethernut5.c +2 -3
index e42e91e..fd021a3 100644
@@ -235,10 +235,9 @@ int board_mmc_init(bd_t *bd)
 	return atmel_mci_init((void *)ATMEL_BASE_MCI);
 }
 
-int board_mmc_getcd(u8 *cd, struct mmc *mmc)
+int board_mmc_getcd(struct mmc *mmc)
 {
-	*cd = at91_get_pio_value(CONFIG_SYS_MMC_CD_PIN) ? 1 : 0;
-	return 0;
+	return !at91_get_pio_value(CONFIG_SYS_MMC_CD_PIN);
 }
 #endif
 
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/1 Ethernut 5: fix build error

Hi Prabhakar,

Le 23/02/2012 12:53, Prabhakar Lad a ?crit :

Quoted 25 lines

Fix build error for ethernut5 board due to prototype change for function board_mmc_getcd().
ethernut5.c:238: error: conflicting types for 'board_mmc_getcd' u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd' was here
make[2]: *** [ethernut5.o] Error 1

Cc Tim Schendekehl<[email protected]>
Cc Thierry Reding<[email protected]>
Cc Albert ARIBAUD<[email protected]>
Cc egnite GmbH<[email protected]>

---
Changes for v2:
Description change.

  board/egnite/ethernut5/ethernut5.c |    5 ++---
  1 files changed, 2 insertions(+), 3 deletions(-)
board/egnite/ethernut5/ethernut5.c +0 -0
index e42e91e..fd021a3 100644
@@ -235,10 +235,9 @@ int board_mmc_init(bd_t *bd)
  	return atmel_mci_init((void *)ATMEL_BASE_MCI);

board/egnite/ethernut5/ethernut5.c int board_mmc_init(bd_t *bd) · line 242

Quoted 10 lines
board/egnite/ethernut5/ethernut5.c +2 -3
  }
 
-int board_mmc_getcd(u8 *cd, struct mmc *mmc)
+int board_mmc_getcd(struct mmc *mmc)
  {
-	*cd = at91_get_pio_value(CONFIG_SYS_MMC_CD_PIN) ? 1 : 0;
-	return 0;
+	return !at91_get_pio_value(CONFIG_SYS_MMC_CD_PIN);
  }
  #endif

Applied to u-boot-arm/master as a bugfix, thanks!

Amicalement,

Signature · 1 line
Albert.