make irq specifier to be provided when assigining irq
[lunaix-os.git] / lunaix-os / hal / devtree / devtree.h
index 1bfe891b5b2540a3adcb9443bfde5a9560278f52..66fe7dc0c9bac28809f99607cc6e2caabc62475f 100644 (file)
@@ -11,10 +11,16 @@ propeq(struct fdt_blob* fdt, fdt_loc_t loc, const char* key)
     return streq(fdt_prop_key(fdt, loc), key);
 }
 
+static inline ptr_t
+__prop_val_ptr(struct fdt_prop* prop)
+{
+    return __ptr(prop) + sizeof(struct fdt_prop);
+}
+
 static inline void
 __mkprop_ptr(fdt_loc_t loc, struct dtp_val* val)
 {
-    val->ptr_val = __ptr(loc.prop->val);
+    val->ptr_val = __prop_val_ptr(loc.prop);
     val->size = loc.prop->len;
 }