From: Horatiu.Vultur@microchip.com Date: Mon, 25 Feb 2019 10:59:54 +0000 (+0000) Subject: spi: designware: Change include order X-Git-Tag: v2019.04-rc4~14^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b77de4476637a614d23b34bcfae0b788409389c;p=platform%2Fkernel%2Fu-boot.git spi: designware: Change include order With current order of include files, the file designware_spi.c can't see that the struct global_data has the member board_type when CONFIG_BOARD_TYPES is defined. By not seeing this then all the members are shifted in the struct global_data. So when the driver is trying to read from device tree blob, it would pass the wrong address to the function 'fdtdev_get_int'. This will make to use the default frequency 500000. The fix consists of changing the order of include files in designware_spi.c to include first common.h file. Signed-off-by: Horatiu Vultur Reviewed-by: Jagan Teki --- diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 02d9376..dadb6fa 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -9,8 +9,8 @@ * Copyright (c) 2009, Intel Corporation. */ -#include #include +#include #include #include #include