Skip to contentSkip to conversation

button: add udevice forward declaration

PATCH New Neil Armstrong 2 participants 3 messages Feb 19, 2021 – Feb 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 button: add udevice forward declaration

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")

---
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 at samsung.com/

 include/button.h | 2 ++
 1 file changed, 2 insertions(+)
include/button.h +2 -0
index 688b63b082..ee14fadf0c 100644
@@ -6,6 +6,8 @@
 #ifndef __BUTTON_H
 #define __BUTTON_H
 
+struct udevice;
+
 /**
  * struct button_uc_plat - Platform data the uclass stores about each device
  *
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 button: add udevice forward declaration

Quoted 16 lines · Neil Armstrong

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")

---
Hi,

Quoted 7 lines

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 at samsung.com/

 include/button.h | 2 ++
 1 file changed, 2 insertions(+)
#2 lore raw

PATCH 1/1 button: add udevice forward declaration

Quoted 19 lines · Simon Glass
Quoted 18 lines · Neil Armstrong

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")

---
Hi,

This is needed to fix build on vim3/vim3l after [1] is applied.

Quoted 8 lines
Quoted 5 lines

[1] https://patchwork.ozlabs.org/project/uboot/cover/20210218103318.18915-1-m.szyprowski at samsung.com/

 include/button.h | 2 ++
 1 file changed, 2 insertions(+)

Thanks, applied to u-boot-amlogic

Neil