[U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()

Prabhakar Lad prabhakar.csengg at gmail.com
Mon Feb 6 15:03:37 CET 2012


Thierry,

On 2/6/12, Thierry Reding <thierry.reding at avionic-design.de> wrote:
> * 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 <prabhakar.csengg at gmail.com>
>> ---
>>  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*/
>                                            ^^^^^^^^^^^^
> Could you fix up this comment at the same time (put spaces after /* and
> before */)?
>
The patch for this fix already submitted, shall submit independent
patch with this fix?

WBR,
--Prabhakar Lad

>> -		*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;
>>  }
>
> Reviewed-by: Thierry Reding <thierry.reding at avionic-design.de>
>


More information about the U-Boot mailing list