lib: utils/serial: Pass the FDT to fdt_serial_init()

Indicate that this function does not modify the FDT blob, and
deduplicate the call to fdt_get_address().

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2024-07-30 21:58:56 -07:00
committed by Anup Patel
parent fa6dfce017
commit c36801841e
3 changed files with 4 additions and 5 deletions

View File

@@ -19,11 +19,11 @@ struct fdt_serial {
int (*init)(const void *fdt, int nodeoff, const struct fdt_match *match);
};
int fdt_serial_init(void);
int fdt_serial_init(const void *fdt);
#else
static inline int fdt_serial_init(void) { return 0; }
static inline int fdt_serial_init(const void *fdt) { return 0; }
#endif