[PATCH v2 1/2] spi: Remove unnecessary #ifdefs in header file
Bin Meng
bmeng.cn at gmail.com
Thu Jul 9 09:54:40 CEST 2020
On Wed, Jul 8, 2020 at 11:02 PM Simon Glass <sjg at chromium.org> wrote:
>
> These prevent use of compile-time checks such as:
>
> if (CONFIG_IS_ENABLED(DM_SPI))
>
> since, for example, if CONFIG_SPL_DM_SPI is not enabled then the
> definitions are not included by spi.h and the C code will not build.
>
> The #ifdefs are unnecessary since there are no conflicts with the pre-DM
> code. In any case we have almost switched over to driver model for SPI.
>
> Drop these #ifdefs from spi.h to fix a build warning on chromebook_coral
> in the following patch.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2:
> - Add an #ifdef around spi_cs_de/activate() as these are static in many drivers
>
> include/spi.h | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
applied to u-boot-x86, thanks!
More information about the U-Boot
mailing list