From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Mon, 6 Feb 2012 14:00:34 +0100 Subject: [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd() In-Reply-To: <1328532854-21510-1-git-send-email-prabhakar.csengg@gmail.com> References: <1328532854-21510-1-git-send-email-prabhakar.csengg@gmail.com> Message-ID: <4F2FCEF2.6090408@de.bosch.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06.02.2012 13:54, Prabhakar Lad wrote: > Fix build error for mx6qarm2 board due to prototype change > for function board_mmc_getcd(). > mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd' > u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd' was here > > Signed-off-by: Prabhakar Lad > --- > board/freescale/mx6qarm2/mx6qarm2.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c > index 9894245..2cb37dd 100644 > --- a/board/freescale/mx6qarm2/mx6qarm2.c > +++ b/board/freescale/mx6qarm2/mx6qarm2.c > @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = { > {USDHC4_BASE_ADDR, 1}, > }; > > -int board_mmc_getcd(u8 *cd, struct mmc *mmc) > +int board_mmc_getcd(struct mmc *mmc) > { > struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; > + int ret = 0; > > if (cfg->esdhc_base == USDHC3_BASE_ADDR) { > gpio_direction_input(171); /*GPIO6_11*/ > - *cd = gpio_get_value(171); > - } else /* Don't have the CD GPIO pin on board */ > - *cd = 0; > + ret = !gpio_get_value(171); > + } > > - return 0; > + return ret; > } > > int board_mmc_init(bd_t *bis) This should be fixed already at u-boot-imx.git: http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=e669db1c209eed02ca8c837914c161f5daa2d8fd Please check. Best regards Dirk