[PATCH] button: add udevice forward declaration

Simon Glass sjg at chromium.org
Sat Feb 20 12:55:10 CET 2021


On Fri, 19 Feb 2021 at 00:41, Neil Armstrong <narmstrong at baylibre.com> wrote:
>
> After 401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
> build fails with :
>
> drivers/button/button-uclass.c:13:5: error: conflicting types for 'button_get_by_label'
> int button_get_by_label(const char *label, struct udevice **devp)
>     ^~~~~~~~~~~~~~~~~~~
>
> Adding struct udevice forward declaration in button.h solves the build error.
>
> Fixes: 401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
> Suggested-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Signed-off-by: Neil Armstrong <narmstrong at baylibre.com>
> ---
> Hi,
>
> This is needed to fix build on vim3/vim3l after [1] is applied.
>
> [1] https://patchwork.ozlabs.org/project/uboot/cover/20210218103318.18915-1-m.szyprowski@samsung.com/
>
>  include/button.h | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list