X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/9daf4fcdae88f72af60aeb0c7722841af02233d4..HEAD:/lunaix-os/includes/hal/devtree.h diff --git a/lunaix-os/includes/hal/devtree.h b/lunaix-os/includes/hal/devtree.h index e7e0cf3..111617e 100644 --- a/lunaix-os/includes/hal/devtree.h +++ b/lunaix-os/includes/hal/devtree.h @@ -1,6 +1,7 @@ #ifndef __LUNAIX_DEVTREE_H #define __LUNAIX_DEVTREE_H +#ifdef CONFIG_USE_DEVICETREE #include #include #include @@ -46,14 +47,14 @@ struct dtp_val { union { - union { - const char* str_val; - const char* str_lst; - }; ptr_t ptr_val; dt_enc_t encoded; union dtp_baseval* ref; + union { + const char* str_val; + const char* str_lst; + }; }; unsigned int size; }; @@ -669,7 +670,7 @@ static inline void dtpi_init_empty(struct dtpropi* dtpi) { *dtpi = (struct dtpropi) { - .prop = { 0, 0 }, + .prop = { {0}, 0 }, .loc = 0 }; } @@ -727,4 +728,5 @@ dtpi_next_val(struct dtpropi* dtpi, struct dtp_val* val, int cells) return true; } +#endif #endif /* __LUNAIX_DEVTREE_H */