Re: [PATCH 1/2] arm: boards: vscom-baltos: Run environment_initcall only on correct board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 17, 2018 at 03:02:09PM +0100, Teresa Remmet wrote:
> Check for the correct hardware before reading the eeprom.
> 
> Signed-off-by: Teresa Remmet <t.remmet@xxxxxxxxx>
> ---
>  arch/arm/boards/vscom-baltos/board.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
> index 39f40a6061f8..c64864d43200 100644
> --- a/arch/arm/boards/vscom-baltos/board.c
> +++ b/arch/arm/boards/vscom-baltos/board.c
> @@ -68,6 +68,9 @@ static int baltos_read_eeprom(void)
>  	int rc;
>  	unsigned char mac_addr[6];
>  
> +	if (!of_machine_is_compatible("vscom,onrisc"))
> +		return 0;
> +
>  	rc = read_file_2("/dev/eeprom0",
>  			 &size,
>  			 (void *)&buf,
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux